Examples
A short list of examples:
Daily server save and shutdown
triggers: daily: type: de.st_ddt.crazyutil.trigger.ScheduledRepeatedTrigger date: 2012.09.17 00:00:00 repeat: -1 interval: 86400000 actions: - shutdown actions: shutdown: type: de.st_ddt.crazyutil.action.Action_COMMAND commands: - save-all - stop
Saves and stops the server every day at 0 o'clock.
Colored / bold message with special chars:
actions: example: type: de.st_ddt.crazyutil.action.Action_MESSAGE messages: - This is a default message - 'c&9Hyperspacing_;":ABV_&Ra' - Welcome to the minecraft server of &9&LCrazy
Showing this messages:
This is a default message
cHyperspacing_;":ABV_a
Welcome to the minecraft server of Crazy
Info:
When starting a message with a color code or other non alphanumerical chars, you have to use 'Message' (Example: '&aExampleText' )
Repeated Messages / MotD / Info Messages
triggers: scheduledAnnouncerEvent: type: de.st_ddt.crazyutil.trigger.ScheduledRepeatedTrigger actions: - scheduledAnnouncements enabled: true date: 2012.08.16 07:44:06 repeat: -1 interval: 60000 actions: scheduledAnnouncements: type: de.st_ddt.crazyutil.action.ActionList_RANDOM amount: 1 actions: action1: type: de.st_ddt.crazyutil.action.Action_MESSAGE messages: - '§&aNotice: &0Notice 1.' action2: type: de.st_ddt.crazyutil.action.Action_MESSAGE messages: - '§&aNotice: &0Notice 2.' action3: type: de.st_ddt.crazyutil.action.Action_MESSAGE messages: - '§&ANotice: &0Notice 3.'
Showing this messages:
§Notice: Notice 2.
§Notice: Notice 1.
§Notice: Notice 3.
§Notice: Notice 3.
§Notice: Notice 1.
§Notice: Notice 2.
Startup Script
triggers: startup: type: de.st_ddt.crazyutil.trigger.StartupTrigger actions: - initialize actions: initialize: type: de.st_ddt.crazyutil.action.Action_COMMAND commands: - time set 0 - weather sun
Notice:You may add a Action_DELAYEDACTION to delay this commands. (Otherwise they are executed just after starting the server.)