-
Notifications
You must be signed in to change notification settings - Fork 0
Home
Welcome to the Cooldowns wiki!
First off, you should download the plugin here.
-
What do I need to know? This plugin is very powerful. Configuration can be tricky, but should ultimately prove to be worth it. Follow the instructions here, and if anything is too hard to follow, post an issue for me to resolve.
-
What are global cooldowns? Global cooldowns imply that every command issued to the player by the group he is assigned to in the config.yml will share a cooldown equivalent to the value listed (in seconds). Local cooldowns mean that commands are unlinked, and can cool down independently. The same is true for warmups.
-
Do I need permissions? Simply put, no. PermissionsBukkit is recommended, but is not necessary. If you are running a small server, and don't need groups, simply add the keys "cooldowns.admins" to your "default: op" template in permissions.yml, and "cooldowns.users" to your "default: true" template. An example can be found on my Permissions page.
-
Can you add <insert feature>? I can try! If you really want to see something added, post an issue with the tag Feature Request, and I'll take a look at it.
Alright! The easy part. Drop the jar (located here) into your plugins folder, and start the server. It'll create a few default files and folders, including plugins/Cooldowns (for the configuration), plugins/Cooldowns/language, and plugins/Cooldowns/users.
The not-so-easy part. The config.yml is very powerful, and allows you to define command warmups and cooldowns for any command you wish, including ones that aren't registered with Bukkit.
A brief snippet of the config:
groups:
users:
prefix: "[users] "
interrupts:
damage: true
movement: true
command: true
globals:
warmups: true
cooldowns: true
commands:
warmup:
home: 2
warp:
home: 2
_all_: 5
cooldown:
home: 60
warp:
home: 60
_all_: 120
This is the basic layout of a group. Each of the early keys is relatively self-explanatory, but the commands node is more robust.
Each key contained in the commands node can either contain a value (and therefor apply warmups or cooldowns to all commands starting with that label) or a set of sub-keys, each containing a value. (Currently, sub-keys of sub-keys are not possible.)
Each value is an integer specified in seconds, after which the command will either execute (in the case of warmups) or become available (in the case of cooldowns).
If the global option is specified for either warmups or cooldowns, all commands listed for that group will have linked cooldowns and will be unavailable while any other command is actively charging or cooling.
If any interrupt option is specified, any action matching the interrupt type which evaluates true will cancel all currently warming commands, even if your warmup type is not global. (If interrupts.damage is set to true, any damage incurred will cancel all currently warming commands.)
The basic command is /cooldowns. This command (used by itself) will display all of your current cooldowns (currently not warmups, as I see no reason to mention them). /cooldowns has two aliases, /cooldown and /cd.
/cooldowns locale (option) - If an option is provided, it will attempt to set the sender's localization to that value. If no such value exists, the old locale will remain and the user will be told that the localization is invalid. If an option is not provided, it will display a list of available localizations.
/cooldowns setup - This will display all of the user's settings, including his global flags and interrupts, as well as his current localization.
/cooldowns help - This will display a brief message detailing the above information.
The localization engine will attempt to match a key.sub-key value for any command you issue, or default to the generic keys. Some variables will be parsed. The default localization can be found here.
Here's an example using the command /give player 1 1
<cmd> - the full command name issued when the command was scheduled ('/give player 1 1') (also <command>)
<label> - the first part of the command, with the / stripped ('give')
<flag> - the first argument passed to the command ('player')
<wu> - in the warmup block, this will evaluate to the number of seconds before the command executes (also <warmup>)
<cd> - in the cooldown block, this will evaluate to the number of seconds before the command becomes available (also <cooldown>)
&0-F - this will evaluate to a color code corresponding to the number (or letter) directly after the ampersand (&)