After a vacation, some exploration with Forge, and the start of a new plugin, itās time to return to CmdCalendar for a new update! Huge amounts of bugs have been squashed, a bunch of features added, and tons of code optimized to make everything run smoother (and, yknow, not crash everything). Additionally, Iāve also spent a lot of time on creating a CmdCalendar Wiki to help with the documentation of the plugin as it continues to grow, so I encourage you to take a look at that if you need help!
Want update notifications, assistance, or just to chat? Join the CmdCalendar Support Discord
Optimized huge sections of code for better performance
Removed lesser-used aliases for ease of use
Collapsed Debug commands into a single command
Implemented Concealed Tasks (Config only)
Stronger verification for task values
Config now correctly generates and saves
Blacklist may now successfully be changed
Fixed various bugs and issues
And so, so much more!
Any issues should be reported with the version [1.1.0]
Excluding multiple commands (hint hint), this is the largest feature request Iāve received for CmdCalendar since itās release. With v1.1.1, you are now able to run commands when the server starts, restarts, or stops - itās as easy as one line of JSON (well three actually, as there areā¦ nevermind).
If youāve used CmdCalendar in the past, youāll have to manually add in the states config section, as shown below.
config {
(config section)
}
states {
# Command executed when the appropriate game state event is fired #
reload="plainbroadcast A server reload has been called!"
started_server="plainbroadcast The server has started!"
stopping_server="plainbroadcast goodbye :'("
}
tasks {
(tasks section)
}
Added scheduled commands for server start, reload, and stop
Added states config node to handle state commands
Updated Util for better organization
Moved starting tasks to onServerStarting
Removed various debug messages - no more blacklist spam!
Any issues should be reported with the version [1.1.1]
@le10077
Iāve updated CmdCalendar to version 1.1.2 to address the StopTask issue and ensure it registers arguments correctly, so you should not experience that issue with the latest version.
CmdCalendar does not currently have a way to specifically target weekends, but there are some other ways you can accomplish this as well (such as an interval task set for 1 weekās time). If this is something youād be interested in, feel free to let me know and Iāll see what I can do for a future update.
Hey,
I wanted to say this plugin is one of my top three!
With this awesome plugin I can make world autosaves every ten minutes ! And many more things! Itās so useful
Thanks and keep up the great work!
Wow!
You are just going overboard! Such hard work put into Sponge and plugins from you, itās very credible!
One more question: So I have my server and I need it to back-up every 10 minutes and there is not really a plugin to do that.
So I thought maybe you can try to create it. What I planned that it could feature is:
A backup of the server every 10 minutes (configurable) that sends a message to all players that a backup was made (configurable message.)
A Backup folder where all backups would be present.
If there is already a similar plugin, please leave the link here
Thatās just a suggestion on another useful plugin that many people ask for.
Thank you!
~Differentiation
As for server backups, the best place to put that would be in plugin requests. IO is one of the things I least understand (even next to reflection!), so I donāt think Iād even be capable of it. You can probably find an existing plugin like that with search, but beyond I wouldnāt know.
Okayā¦ this plugin is quite difficult to figure out but I think I finally got it working. The last bit of weirdness is that it seems to load scheduled tasks in a random manner. I have no clue how it arrived at this order.
[05:58:40] [Server thread/INFO]: 80: AS02-021 [Scheduler] -> Active
[05:58:40] [Server thread/INFO]: 81: AS02-020 [Scheduler] -> Active
[05:58:40] [Server thread/INFO]: 82: AS08-012 [Scheduler] -> Active
[05:58:40] [Server thread/INFO]: 83: AS14-003 [Scheduler] -> Active
[05:58:40] [Server thread/INFO]: 84: AS14-002 [Scheduler] -> Active
[05:58:40] [Server thread/INFO]: 85: AS08-013 [Scheduler] -> Active
[05:58:40] [Server thread/INFO]: 86: AS14-005 [Scheduler] -> Active
[05:58:40] [Server thread/INFO]: 87: AS14-004 [Scheduler] -> Active
[05:58:40] [Server thread/INFO]: 88: AS14-007 [Scheduler] -> Active
[05:58:40] [Server thread/INFO]: 89: AS14-006 [Scheduler] -> Active
[05:58:40] [Server thread/INFO]: 90: AS08-000 [Scheduler] -> Active
[05:58:40] [Server thread/INFO]: 91: AS08-001 [Scheduler] -> Active
[05:58:40] [Server thread/INFO]: 92: AS08-002 [Scheduler] -> Active
Auto Shutdown by Dale Mahalko / Plawerth
for this scheduler:
# CmdCalendar - Developed by Simon_Flash
config {
# Active tasks are automatically activated when server starts #
"activate_on_startup"=true
# Command to be blacklisted (Currently supports only the base command) #
"command_blacklist"=[
cc,
cmdcal,
cmdcalendar
]
# Use the command blacklist #
"command_blacklist_check"=true
# Interval tasks wait the delay length before first running #
"interval_delay_start"=true
}
tasks {
AS02-000 {
command="broadcast Restart schedule by Dale Mahalko / Plawerth."
description="Autoshutdown alerter"
schedule="58 44 02 * *"
status=Active
type=Scheduler
}
AS02-001 {
command="say Server will restart in 15 minutes."
description="Autoshutdown alerter"
schedule="00 45 02 * *"
status=Active
type=Scheduler
}
AS02-002 {
command="broadcast Server will restart in 10 minutes."
description="Autoshutdown alerter"
schedule="00 50 02 * *"
status=Active
type=Scheduler
}
AS02-003 {
command="broadcast Server will restart in 5 minutes."
description="Autoshutdown alerter"
schedule="00 55 02 * *"
status=Active
type=Scheduler
}
AS02-004 {
command="broadcast Server will restart in 4 minutes."
description="Autoshutdown alerter"
schedule="00 56 02 * *"
status=Active
type=Scheduler
}
AS02-005 {
command="broadcast Server will restart in 3 minutes."
description="Autoshutdown alerter"
schedule="00 57 02 * *"
status=Active
type=Scheduler
}
AS02-006 {
command="broadcast Server will restart in 2 minutes."
description="Autoshutdown alerter"
schedule="00 58 02 * *"
status=Active
type=Scheduler
}
AS02-007 {
command="broadcast Server will restart in 1 minutes."
description="Autoshutdown alerter"
schedule="00 59 02 * *"
status=Active
type=Scheduler
}
AS02-008 {
command="broadcast Server will restart in 45 seconds."
description="Autoshutdown alerter"
schedule="15 59 02 * *"
status=Active
type=Scheduler
}
AS02-009 {
command="broadcast Server will restart in 30 seconds."
description="Autoshutdown alerter"
schedule="30 59 02 * *"
status=Active
type=Scheduler
}
AS02-010 {
command="say Server will restart in 15 seconds."
description="Autoshutdown alerter"
schedule="45 59 02 * *"
status=Active
type=Scheduler
}
AS02-011 {
command="broadcast Server will restart in 10 seconds."
description="Autoshutdown alerter"
schedule="50 59 02 * *"
status=Active
type=Scheduler
}
AS02-012 {
command="broadcast Server will restart in 9 seconds."
description="Autoshutdown alerter"
schedule="51 59 02 * *"
status=Active
type=Scheduler
}
AS02-013 {
command="broadcast Server will restart in 8 seconds."
description="Autoshutdown alerter"
schedule="52 59 02 * *"
status=Active
type=Scheduler
}
AS02-014 {
command="broadcast Server will restart in 7 seconds."
description="Autoshutdown alerter"
schedule="53 59 02 * *"
status=Active
type=Scheduler
}
AS02-015 {
command="broadcast Server will restart in 6 seconds."
description="Autoshutdown alerter"
schedule="54 59 02 * *"
status=Active
type=Scheduler
}
AS02-016 {
command="broadcast Server will restart in 5 seconds."
description="Autoshutdown alerter"
schedule="55 59 02 * *"
status=Active
type=Scheduler
}
AS02-017 {
command="broadcast Server will restart in 4 seconds."
description="Autoshutdown alerter"
schedule="56 59 02 * *"
status=Active
type=Scheduler
}
AS02-018 {
command="broadcast Server will restart in 3 seconds."
description="Autoshutdown alerter"
schedule="57 59 02 * *"
status=Active
type=Scheduler
}
AS02-019 {
command="broadcast Server will restart in 2 seconds."
description="Autoshutdown alerter"
schedule="58 59 02 * *"
status=Active
type=Scheduler
}
AS02-020 {
command="broadcast Server will restart in 1 second."
description="Autoshutdown alerter"
schedule="59 59 02 * *"
status=Active
type=Scheduler
}
AS02-021 {
command="kickall Server rebooting!"
description="Autoshutdown alerter"
schedule="00 00 03 * *"
status=Active
type=Scheduler
}
AS02-022 {
command="stop We will be right back."
description="Autoshutdown alerter"
schedule="05 00 03 * *"
status=Active
type=Scheduler
}
AS08-000 {
command="broadcast Restart schedule by Dale Mahalko / Plawerth."
description="Autoshutdown alerter"
schedule="58 44 08 * *"
status=Active
type=Scheduler
}
AS08-001 {
command="say Server will restart in 15 minutes."
description="Autoshutdown alerter"
schedule="00 45 08 * *"
status=Active
type=Scheduler
}
AS08-002 {
command="broadcast Server will restart in 10 minutes."
description="Autoshutdown alerter"
schedule="00 50 08 * *"
status=Active
type=Scheduler
}
AS08-003 {
command="broadcast Server will restart in 5 minutes."
description="Autoshutdown alerter"
schedule="00 55 08 * *"
status=Active
type=Scheduler
}
AS08-004 {
command="broadcast Server will restart in 4 minutes."
description="Autoshutdown alerter"
schedule="00 56 08 * *"
status=Active
type=Scheduler
}
AS08-005 {
command="broadcast Server will restart in 3 minutes."
description="Autoshutdown alerter"
schedule="00 57 08 * *"
status=Active
type=Scheduler
}
AS08-006 {
command="broadcast Server will restart in 2 minutes."
description="Autoshutdown alerter"
schedule="00 58 08 * *"
status=Active
type=Scheduler
}
AS08-007 {
command="broadcast Server will restart in 1 minutes."
description="Autoshutdown alerter"
schedule="00 59 08 * *"
status=Active
type=Scheduler
}
AS08-008 {
command="broadcast Server will restart in 45 seconds."
description="Autoshutdown alerter"
schedule="15 59 08 * *"
status=Active
type=Scheduler
}
AS08-009 {
command="broadcast Server will restart in 30 seconds."
description="Autoshutdown alerter"
schedule="30 59 08 * *"
status=Active
type=Scheduler
}
AS08-010 {
command="say Server will restart in 15 seconds."
description="Autoshutdown alerter"
schedule="45 59 08 * *"
status=Active
type=Scheduler
}
AS08-011 {
command="broadcast Server will restart in 10 seconds."
description="Autoshutdown alerter"
schedule="50 59 08 * *"
status=Active
type=Scheduler
}
AS08-012 {
command="broadcast Server will restart in 9 seconds."
description="Autoshutdown alerter"
schedule="51 59 08 * *"
status=Active
type=Scheduler
}
AS08-013 {
command="broadcast Server will restart in 8 seconds."
description="Autoshutdown alerter"
schedule="52 59 08 * *"
status=Active
type=Scheduler
}
AS08-014 {
command="broadcast Server will restart in 7 seconds."
description="Autoshutdown alerter"
schedule="53 59 08 * *"
status=Active
type=Scheduler
}
AS08-015 {
command="broadcast Server will restart in 6 seconds."
description="Autoshutdown alerter"
schedule="54 59 08 * *"
status=Active
type=Scheduler
}
AS08-016 {
command="broadcast Server will restart in 5 seconds."
description="Autoshutdown alerter"
schedule="55 59 08 * *"
status=Active
type=Scheduler
}
AS08-017 {
command="broadcast Server will restart in 4 seconds."
description="Autoshutdown alerter"
schedule="56 59 08 * *"
status=Active
type=Scheduler
}
AS08-018 {
command="broadcast Server will restart in 3 seconds."
description="Autoshutdown alerter"
schedule="57 59 08 * *"
status=Active
type=Scheduler
}
AS08-019 {
command="broadcast Server will restart in 2 seconds."
description="Autoshutdown alerter"
schedule="58 59 08 * *"
status=Active
type=Scheduler
}
AS08-020 {
command="broadcast Server will restart in 1 second."
description="Autoshutdown alerter"
schedule="59 59 08 * *"
status=Active
type=Scheduler
}
AS08-021 {
command="kickall Server rebooting!"
description="Autoshutdown alerter"
schedule="00 00 09 * *"
status=Active
type=Scheduler
}
AS08-022 {
command="stop We will be right back."
description="Autoshutdown alerter"
schedule="05 00 09 * *"
status=Active
type=Scheduler
}
AS14-000 {
command="broadcast Restart schedule by Dale Mahalko / Plawerth."
description="Autoshutdown alerter"
schedule="58 44 14 * *"
status=Active
type=Scheduler
}
AS14-001 {
command="say Server will restart in 15 minutes."
description="Autoshutdown alerter"
schedule="00 45 14 * *"
status=Active
type=Scheduler
}
AS14-002 {
command="broadcast Server will restart in 10 minutes."
description="Autoshutdown alerter"
schedule="00 50 14 * *"
status=Active
type=Scheduler
}
AS14-003 {
command="broadcast Server will restart in 5 minutes."
description="Autoshutdown alerter"
schedule="00 55 14 * *"
status=Active
type=Scheduler
}
AS14-004 {
command="broadcast Server will restart in 4 minutes."
description="Autoshutdown alerter"
schedule="00 56 14 * *"
status=Active
type=Scheduler
}
AS14-005 {
command="broadcast Server will restart in 3 minutes."
description="Autoshutdown alerter"
schedule="00 57 14 * *"
status=Active
type=Scheduler
}
AS14-006 {
command="broadcast Server will restart in 2 minutes."
description="Autoshutdown alerter"
schedule="00 58 14 * *"
status=Active
type=Scheduler
}
AS14-007 {
command="broadcast Server will restart in 1 minutes."
description="Autoshutdown alerter"
schedule="00 59 14 * *"
status=Active
type=Scheduler
}
AS14-008 {
command="broadcast Server will restart in 45 seconds."
description="Autoshutdown alerter"
schedule="15 59 14 * *"
status=Active
type=Scheduler
}
AS14-009 {
command="broadcast Server will restart in 30 seconds."
description="Autoshutdown alerter"
schedule="30 59 14 * *"
status=Active
type=Scheduler
}
AS14-010 {
command="say Server will restart in 15 seconds."
description="Autoshutdown alerter"
schedule="45 59 14 * *"
status=Active
type=Scheduler
}
AS14-011 {
command="broadcast Server will restart in 10 seconds."
description="Autoshutdown alerter"
schedule="50 59 14 * *"
status=Active
type=Scheduler
}
AS14-012 {
command="broadcast Server will restart in 9 seconds."
description="Autoshutdown alerter"
schedule="51 59 14 * *"
status=Active
type=Scheduler
}
AS14-013 {
command="broadcast Server will restart in 8 seconds."
description="Autoshutdown alerter"
schedule="52 59 14 * *"
status=Active
type=Scheduler
}
AS14-014 {
command="broadcast Server will restart in 7 seconds."
description="Autoshutdown alerter"
schedule="53 59 14 * *"
status=Active
type=Scheduler
}
AS14-015 {
command="broadcast Server will restart in 6 seconds."
description="Autoshutdown alerter"
schedule="54 59 14 * *"
status=Active
type=Scheduler
}
AS14-016 {
command="broadcast Server will restart in 5 seconds."
description="Autoshutdown alerter"
schedule="55 59 14 * *"
status=Active
type=Scheduler
}
AS14-017 {
command="broadcast Server will restart in 4 seconds."
description="Autoshutdown alerter"
schedule="56 59 14 * *"
status=Active
type=Scheduler
}
AS14-018 {
command="broadcast Server will restart in 3 seconds."
description="Autoshutdown alerter"
schedule="57 59 14 * *"
status=Active
type=Scheduler
}
AS14-019 {
command="broadcast Server will restart in 2 seconds."
description="Autoshutdown alerter"
schedule="58 59 14 * *"
status=Active
type=Scheduler
}
AS14-020 {
command="broadcast Server will restart in 1 second."
description="Autoshutdown alerter"
schedule="59 59 14 * *"
status=Active
type=Scheduler
}
AS14-021 {
command="kickall Server rebooting!"
description="Autoshutdown alerter"
schedule="00 00 15 * *"
status=Active
type=Scheduler
}
AS14-022 {
command="stop We will be right back."
description="Autoshutdown alerter"
schedule="05 00 15 * *"
status=Active
type=Scheduler
}
AS20-000 {
command="broadcast Restart schedule by Dale Mahalko / Plawerth."
description="Autoshutdown alerter"
schedule="58 44 20 * *"
status=Active
type=Scheduler
}
AS20-001 {
command="say Server will restart in 15 minutes."
description="Autoshutdown alerter"
schedule="00 45 20 * *"
status=Active
type=Scheduler
}
AS20-002 {
command="broadcast Server will restart in 10 minutes."
description="Autoshutdown alerter"
schedule="00 50 20 * *"
status=Active
type=Scheduler
}
AS20-003 {
command="broadcast Server will restart in 5 minutes."
description="Autoshutdown alerter"
schedule="00 55 20 * *"
status=Active
type=Scheduler
}
AS20-004 {
command="broadcast Server will restart in 4 minutes."
description="Autoshutdown alerter"
schedule="00 56 20 * *"
status=Active
type=Scheduler
}
AS20-005 {
command="broadcast Server will restart in 3 minutes."
description="Autoshutdown alerter"
schedule="00 57 20 * *"
status=Active
type=Scheduler
}
AS20-006 {
command="broadcast Server will restart in 2 minutes."
description="Autoshutdown alerter"
schedule="00 58 20 * *"
status=Active
type=Scheduler
}
AS20-007 {
command="broadcast Server will restart in 1 minutes."
description="Autoshutdown alerter"
schedule="00 59 20 * *"
status=Active
type=Scheduler
}
AS20-008 {
command="broadcast Server will restart in 45 seconds."
description="Autoshutdown alerter"
schedule="15 59 20 * *"
status=Active
type=Scheduler
}
AS20-009 {
command="broadcast Server will restart in 30 seconds."
description="Autoshutdown alerter"
schedule="30 59 20 * *"
status=Active
type=Scheduler
}
AS20-010 {
command="say Server will restart in 15 seconds."
description="Autoshutdown alerter"
schedule="45 59 20 * *"
status=Active
type=Scheduler
}
AS20-011 {
command="broadcast Server will restart in 10 seconds."
description="Autoshutdown alerter"
schedule="50 59 20 * *"
status=Active
type=Scheduler
}
AS20-012 {
command="broadcast Server will restart in 9 seconds."
description="Autoshutdown alerter"
schedule="51 59 20 * *"
status=Active
type=Scheduler
}
AS20-013 {
command="broadcast Server will restart in 8 seconds."
description="Autoshutdown alerter"
schedule="52 59 20 * *"
status=Active
type=Scheduler
}
AS20-014 {
command="broadcast Server will restart in 7 seconds."
description="Autoshutdown alerter"
schedule="53 59 20 * *"
status=Active
type=Scheduler
}
AS20-015 {
command="broadcast Server will restart in 6 seconds."
description="Autoshutdown alerter"
schedule="54 59 20 * *"
status=Active
type=Scheduler
}
AS20-016 {
command="broadcast Server will restart in 5 seconds."
description="Autoshutdown alerter"
schedule="55 59 20 * *"
status=Active
type=Scheduler
}
AS20-017 {
command="broadcast Server will restart in 4 seconds."
description="Autoshutdown alerter"
schedule="56 59 20 * *"
status=Active
type=Scheduler
}
AS20-018 {
command="broadcast Server will restart in 3 seconds."
description="Autoshutdown alerter"
schedule="57 59 20 * *"
status=Active
type=Scheduler
}
AS20-019 {
command="broadcast Server will restart in 2 seconds."
description="Autoshutdown alerter"
schedule="58 59 20 * *"
status=Active
type=Scheduler
}
AS20-020 {
command="broadcast Server will restart in 1 second."
description="Autoshutdown alerter"
schedule="59 59 20 * *"
status=Active
type=Scheduler
}
AS20-021 {
command="kickall Server rebooting!"
description="Autoshutdown alerter"
schedule="00 00 21 * *"
status=Active
type=Scheduler
}
AS20-022 {
command="stop We will be right back."
description="Autoshutdown alerter"
schedule="05 00 21 * *"
status=Active
type=Scheduler
}
}
The explanation is not on the wiki but is instead within the README. In relation to the printout order, all that is is the iteration of a HashMap which has no consistent order.
Additionally, note that very little in this plugin is optimised (especially for 90-something tasks). If it were me, Iād find a different system to handle auto shutdowns.
Which has a tendency to go bonkers on the first of the month for certain months and executes all commands in the scheduler simultaneously as the plugin is loadingā¦
ā¦ searching the Ore repository for āshutdownā or āautoshutdownā turns up no results, so again, optimized or not, looks like I will probably be using this for shutdown scheduling.
As long as this can manage to do commands scheduled 1-second apart not out of order, though not necessarily exactly 1 second apartā¦ I can accept that.
ummm, looked great right up to the last moment, but then it failed to execute the āstopā command, even though I took that out of the ācommand blacklistā at the top of the config file. What happened?
,
[20:44:58] [Server thread/INFO] [nucleus]: Server ran the command: /broadcast Restart schedule by Dale Mahalko / Plawerth.
[20:45:00] [Server thread/INFO] [nucleus]: Server ran the command: /say Server will restart in 15 minutes.
[20:50:00] [Server thread/INFO] [nucleus]: Server ran the command: /broadcast Server will restart in 10 minutes.
[20:55:00] [Server thread/INFO] [nucleus]: Server ran the command: /broadcast Server will restart in 5 minutes.
[20:56:00] [Server thread/INFO] [nucleus]: Server ran the command: /broadcast Server will restart in 4 minutes.
[20:57:00] [Server thread/INFO] [nucleus]: Server ran the command: /broadcast Server will restart in 3 minutes.
[20:58:00] [Server thread/INFO] [nucleus]: Server ran the command: /broadcast Server will restart in 2 minutes.
[20:59:00] [Server thread/INFO] [nucleus]: Server ran the command: /broadcast Server will restart in 1 minutes.
[20:59:15] [Server thread/INFO] [nucleus]: Server ran the command: /broadcast Server will restart in 45 seconds.
[20:59:30] [Server thread/INFO] [nucleus]: Server ran the command: /broadcast Server will restart in 30 seconds.
[20:59:45] [Server thread/INFO] [nucleus]: Server ran the command: /say Server will restart in 15 seconds.
[20:59:50] [Server thread/INFO] [nucleus]: Server ran the command: /broadcast Server will restart in 10 seconds.
[20:59:51] [Server thread/INFO] [nucleus]: Server ran the command: /broadcast Server will restart in 9 seconds.
[20:59:52] [Server thread/INFO] [nucleus]: Server ran the command: /broadcast Server will restart in 8 seconds.
[20:59:53] [Server thread/INFO] [nucleus]: Server ran the command: /broadcast Server will restart in 7 seconds.
[20:59:54] [Server thread/INFO] [nucleus]: Server ran the command: /broadcast Server will restart in 6 seconds.
[20:59:55] [Server thread/INFO] [nucleus]: Server ran the command: /broadcast Server will restart in 5 seconds.
[20:59:56] [Server thread/INFO] [nucleus]: Server ran the command: /broadcast Server will restart in 4 seconds.
[20:59:57] [Server thread/INFO] [nucleus]: Server ran the command: /broadcast Server will restart in 3 seconds.
[20:59:58] [Server thread/INFO] [nucleus]: Server ran the command: /broadcast Server will restart in 2 seconds.
[20:59:59] [Server thread/INFO] [nucleus]: Server ran the command: /broadcast Server will restart in 1 second.
[21:00:00] [Server thread/INFO] [nucleus]: Server ran the command: /kickall Server rebooting!
[21:00:00] [Server thread/INFO]: All players were kicked.
[21:00:00] [Server thread/INFO]: Reason: Server rebooting!
ā¦ and then it didnāt stop, but kept running. I donāt see any error messages in the server logs.
Would this plugin actually allow me to input something in console after a certain message is said in-game.
Example: Someone says āhelpā in chat and the plugin could respond with a message or command Iāve set?
This thread is no longer in use as the plugin has been migrated to Ore under the name CmdScheduler. For any further questions or comments, please use the discussion thread there or my support discord.
@Its_Blacky For custom commands, youāre looking for CmdBuilder. Something that listens into chat messages is far more complex and should ultimately require a custom plugin. Personally, I donāt recommend going that route - itās far more trouble than itās worth.
@TGL Sure, however ultimately any distribution needs to be rerouted to the Ore page linked above.