CommandClock
CommandClock is a simple Bukkit-plugin for automating and timing commands.
Config (for alpha users and pros)
The plugin's config.yml file should be built up as follows: The first row must say "schedules:". After this row, every other text must start with a space character. From the second line and on, you can define as much tasks as you want/need/feel like. Every task is defined like this:
- After the space, type a unique name for the task, followed by a colon. Then, hit newline.
- At the beginning of the new line add TWO spaces. Then, you type "file: "(leave a space after the colon!) and the path to the file (see also: Functionality)
- Create a new line, again with two spaces starting it. Then type "delay: " and the number of ticks (1/20th of a second) to wait before repeating the command array. Repeat the steps above until you added every task you needed. (IMPORTANT: The line containing the unique name has to have exactly ONE space at its beginning!) Example:
schedules: first_task_name: file: task_file_url delay: delay_in_ticks second_task_name: file: task2_file_url delay: delay_in_ticks
Functionality
The thing after "file: "
The path given in the config must follow one of the three formats below:
- If the path contains no colons, the path will be considered as relative, which means the plugin will look for the file in the same directory as the config.yml is in.
- If the path starts with either "http://", "https://" or "ftp://", the plugin will atempt to look up that web address for the file. Be warned: only the "http://" one was tested!
- Every other path will be considered as an absolute local path. This means that the plugin will ask your file system for the file. Examples: "C:\server-stuff\file.txt", "file:///home/user/server/file.txt" (for Linux users)
What is this file, even?
The file given must be a standard text file, containing a newline-separated list of commands to execute. (Leave out a slash at the beginning of the command, for instance if you want to run "/time set day", type "time set day". If the command you'd type in is "//somecmd", type "/somecmd" instead.) The file may be modified while the plugin is waiting, therefore allowing for dynamic use (You may also modify the config file, but then you should run the /cmdclock reload command as seen below).
Commands
The first and most important:
- /cmdclock reload - It resets the timers and reloads the config file and is recommended to use when you (or an another program) changes the config file. Commands for in-game management of tasks (in 0.0.3-BETA and newer):
- /cmdclock addtask <taskname> <delay> <filepath> - Just a more user-friendly way to add tasks (no need to edit configs! NOTE: Will reset timers.)
- /cmdclock removetask <taskname> - I think you've figured it out.
- Currently not sure how I want to do /cmdclock modifytask (spoiled for choice :P) so it's not in 0.0.3.
Comments