1.0.3
Compatibility
Changes
New Features in TimerCommand Plugin
Overview
Three major new features have been added to the TimerCommand plugin:
- WEEKLY type - Commands on specific days of the week
- Multiple Commands Support - Execute multiple commands for one scheduler
- GAME_TIME type - Commands based on in-game time in a world
1. WEEKLY Type - Commands on Specific Days of the Week
Description
Allows you to run a command on specific days of the week at a determined time (e.g., every Friday at 22:59).
Configuration
weekly-example:
enabled: true
type: "WEEKLY"
command: "say This command runs every Monday, Wednesday and Friday at 12:00!"
time: "12:00" # Format: HH:mm or HH:mm:ss
days:
- "monday"
- "wednesday"
- "friday"
Command Format
/tc add WEEKLY <command_name> <day_1-7> <HH:MM:SS> <command>
Day Numbers:
1= Monday2= Tuesday3= Wednesday4= Thursday5= Friday6= Saturday7= Sunday
Supported Days in config.yml
monday(MON)tuesday(TUE)wednesday(WED)thursday(THU)friday(FRI)saturday(SAT)sunday(SUN)
Days are case-insensitive - all of these work:
"monday","MONDAY","Monday""mon","MON","Mon"
Examples
Example 1: Command every Tuesday at 15:30
tuesday-event:
enabled: true
type: "WEEKLY"
command: "say Tuesday event!"
time: "15:30"
days:
- "tuesday"
Command line: /tc add WEEKLY tuesday_event 2 15:30 say Tuesday event!
Example 2: Commands on weekdays at 09:00
weekday-morning:
enabled: true
type: "WEEKLY"
commands:
- "say Good morning!"
- "broadcast Server is ready"
time: "09:00"
days:
- "monday"
- "tuesday"
- "wednesday"
- "thursday"
- "friday"
Command line: /tc add WEEKLY weekday_morning 1 09:00 say Good morning!
Then manually add days to config.yml.
2. Multiple Commands Support
Description
Instead of running a single command, you can now specify a list of commands that will be executed in sequence.
Configuration
Old way (still works):
single-command:
enabled: true
type: "TIME"
command: "say Single command"
time: "12:00"
New way (list):
multiple-commands:
enabled: true
type: "TIME"
commands:
- "say First command"
- "give @a diamond 1"
- "broadcast Server announcement"
time: "12:00"
Notes
- When using the
commandsarray, thecommandfield is ignored - Commands execute in the order specified in the configuration
- This feature works with ALL scheduler types (TIME, INTERVAL, MONTHLY_DAY, WEEKLY, GAME_TIME)
Examples
Example 1: Daily cleanup with multiple commands
daily-cleanup:
enabled: true
type: "TIME"
commands:
- "say Starting server cleanup!"
- "save-all"
- "broadcast Server will restart in 10 seconds"
time: "06:00"
Example 2: Weekly bonus on Friday with multiple commands
weekly-bonus:
enabled: true
type: "WEEKLY"
commands:
- "broadcast Friday bonus!"
- "give @a gold_ingot 10"
- "effect give @a speed 3600 1"
time: "19:00"
days:
- "friday"
3. GAME_TIME Type - Commands Based on In-Game Time
Description
Allows you to run a command at a specific in-game time (measured in ticks) in a specific world (e.g., when the sun reaches noon).
In-game time is measured in ticks (0-24000 per day):
- 0 ticks = Sunrise (start of day)
- 6000 ticks = Noon (sun at highest point)
- 12000 ticks = Sunset (afternoon/evening)
- 18000 ticks = Midnight (darkest, start of night)
Configuration
game-time-example:
enabled: true
type: "GAME_TIME"
command: "say It's noon in-game!"
world: "world" # World name
tick: 6000 # In-game tick (0-24000)
Command Format
/tc add GAME_TIME <command_name> <world_name> <tick_0-24000> <command>
Important Information
- The command runs only once per day at the specified tick
- The command runs only in the specified world
- You must specify an existing world name (e.g., "world", "world_nether", "custom_world")
- In-game time depends on the
doDaylightCyclegamerule - if it's off, the command may not trigger
Examples
Example 1: Noon announcement
noon-event:
enabled: true
type: "GAME_TIME"
command: "say The sun has reached its peak!"
world: "world"
tick: 6000
Command line: /tc add GAME_TIME noon_event world 6000 say The sun has reached its peak!
Example 2: Midnight effect with multiple commands
midnight-event:
enabled: true
type: "GAME_TIME"
commands:
- "say Midnight in-game!"
- "effect give @a blindness 10"
- "broadcast The night is darkest!"
world: "world"
tick: 18000
Command line: /tc add GAME_TIME midnight_event world 18000 say Midnight in-game!
Example 3: Multiple world events during the day
sunrise:
enabled: true
type: "GAME_TIME"
command: "effect give @a speed 300 1"
world: "world"
tick: 0
sunset:
enabled: true
type: "GAME_TIME"
commands:
- "say The sun is setting"
- "effect give @a slowness 300 1"
world: "world"
tick: 12000
Combined Examples
WEEKLY + Multiple Commands
weekly-with-multiple:
enabled: true
type: "WEEKLY"
commands:
- "say Friday is here!"
- "give @a diamond 5"
- "effect give @a haste 1800 2"
- "broadcast Weekend event starts!"
time: "19:00"
days:
- "friday"
Command line: /tc add WEEKLY friday_event 5 19:00 say Friday is here!
GAME_TIME + Multiple Commands in Different Worlds
world-noon:
enabled: true
type: "GAME_TIME"
commands:
- "execute in world run effect give @a speed 600 1"
- "broadcast It's noon in the main world!"
world: "world"
tick: 6000
nether-midnight:
enabled: true
type: "GAME_TIME"
command: "say It's midnight in the Nether"
world: "world_nether"
tick: 18000
Backward Compatibility
- Old configurations will continue to work without any changes
- New features are completely optional
- Old
commandand newcommandslist cannot be used together in one scheduler - The plugin automatically prioritizes
commandsif both are present
Technical Details
Modified Classes
-
ScheduledCommand.java
- Added
commandsfield (list instead of single command) - Added
daysOfWeekfield for WEEKLY type - Added
gameTimeWorldandgameTimeTargetfields for GAME_TIME type - New methods:
checkWeeklyExecution(),checkGameTimeExecution() - Method
execute()now supports multiple commands
- Added
-
CommandScheduler.java
- Updated
loadCommands()method to support:- Loading
commandsarray - Parsing
daysarray for WEEKLY type - Parsing
worldandtickfor GAME_TIME type
- Loading
- Added import for
java.time.DayOfWeek - Updated
addCommand()method to save WEEKLY and GAME_TIME parameters
- Updated
-
commands.yml
- Added examples of all three new types
- Updated documentation with command formats
Troubleshooting
GAME_TIME command didn't trigger
Possible causes:
- World doesn't exist or name is misspelled
doDaylightCyclegamerule is disabled- In-game time hasn't reached the specified tick yet
Solutions:
- Verify world name using
/say %server_world_name% - Enable daylightCycle:
/gamerule doDaylightCycle true - Check in-game time:
/time
WEEKLY command didn't trigger
Possible causes:
- Day name is misspelled
- Timezone in
config.ymlis incorrect
Solutions:
- Verify day spelling (e.g., "monday" not "mondy")
- Check
config.ymland set the correct timezone
Questions?
For more information, see the commands.yml file documentation or README.md
Projects on Modrinth are automatically available through a Maven repository for use with JVM build tools such as Gradle. To learn more about the Modrinth Maven API, click here.
Note: When available, you should use the creator's maven repo instead as it will have transitive dependency information that the Modrinth Maven API does not. You may also end up with duplicate dependencies if you use a mix of Modrinth and non-Modrinth Maven repositories for your dependencies, because the group identifier will be different when served through the Modrinth Maven API.
Maven coordinates:
Version ID:
build.gradle:
repositories {
exclusiveContent {
forRepository {
maven {
name = "Modrinth"
url = "https://api.modrinth.com/maven"
}
}
// forRepositories(fg.repository) // Uncomment when using ForgeGradle
filter {
includeGroup "maven.modrinth"
}
}
}
// Standard Gradle dependency
dependencies {
implementation "maven.modrinth:qFZbTPYs:4saUs5Pz"
}
// Legacy Loom dependency
dependencies {
modImplementation "maven.modrinth:qFZbTPYs:4saUs5Pz"
}

