Command Cooldown
Command Cooldown
Command Cooldown
Command Cooldown allows you to set a cooldown for any command, set in a config. What can you use it for? Standard users might have to wait xxx amount of seconds between uses of a command like warp, while donator ranks would get lower, or perhaps even no cooldown between uses. Or perhaps you just want a 60 seconds delay between uses of /smite! It's all possible!
Configuration
In the config.yml, simple add the command you want limited, followed by the seconds of delay. After that, every user with the permission "commandcooldown." + (commandname) + (seconds of delay) will have to wait that amount of seconds between uses of the command. Any cooldowns will stay persistent even if the server reloads or restarts!
Example: In the config, if " - heal60" is added under "commands:", all players with the permission "commandcooldown.heal60" will have to wait 60 seconds between uses of /heal. If you also have " - heal20" in the config, and a player has both permissions "commandcooldown.heal20" and "commandcooldown.heal60", they will only have to wait 20 seconds.
The config comes with two example uses.
Commands
- /commandcooldown - reloads the plugin configuration without having to restart the server.
Permissions
- commandcooldown.override - override all cooldowns.
- commandcooldown.[command][seconds of delay] - delay a command for a specific rank. This permission will only be active if it has been set in the config first. Example: commandcooldown.smite60.
- If a player does not have any commandcooldown permissions relating to a command, he or she will not be limited by any cooldowns that are in the configuration pertaining to that command.
- commandcooldown.reload - allows use of /commandcooldown, which reloads the configuration without having to restart the server.
Here is the source code, if you're curious: source
@Zittla
Adding underscores does not work for me. Does it work for you?
@LegitCrafter
you will need underscores like /time_set_day
What if commands has a space in them? For example: /time set day So what would be the permission of this and what will I type in the config?
@ria80
This plugin still seems to work with the latest builds of 1.6.4 / 1.7.2 as well.
This plugins is inactive ?
im not quite sure what to do as far as multi-word commands. For example i want to add a cooldown (lets say X) to the command /plotme home would it be /plotme homeX?
Is this plugin still being updated?
Any info about having multiple commands?
Awesome men, you are useful for my plugins ;)
Hi 7777seconds, I've found a bug:
If we set a cooldown for lets say "/clearinventory", then when we first type that command it works, for the next time we must wait. So that is working, but when we in the maintime write "/clear" or "/ci" or "/clearinvent" or whichever alias, the cooldown is bypassed and they can use that command.
Those commands are from Essentials, but I think it is the same with all other plugins.
I think I'm asking this on the wrong place, but does this support commands from cShortcut? Just thought it would be cool if i could add a cooldown to a spawnpoint command. Of course I "modded" the spawnpoint command a bit, else I would do it directly.
Almost Raged !
Until I re-read this page about 17 times....
||||||||||||||||||||||
In the config.yml simple add the command you want limited, followed by the seconds of delay. After that, every user with the permission "commandcooldown." + (commandname) + (seconds of delay) will have to wait that amount of seconds between uses of the command. Any cooldowns will stay persistent even if the server reloads or restarts!
|||||||||||||||||||||
Since I had to read this page 17 times, and it took me over 20 minutes to actually understand how to even use this plugin.
I thought I would comment here, and give a Quick simple Example.
Here is my config example (this plugin works for any command)
* -kick
* -restart
* -reload
* -save-all
|||||||||||||||||||||||
in your permissions folder/file lets say group manager.
you will need to put these permissions in.
|||}| Guest group
* - commandcooldown.kick86400
* - commandcooldown.restart86400
* - commandcooldown.reload86400
* - commandcooldown.save-all86400
( not sure if the config even matters or works)
in a hurry here.. so basically go in the config, cut the numbers in half
in permissions also cut the numbers in half.
cool downs on the commands are cut to 12 hours instead of 24.
||||| Member group
* - commandcooldown.kick43200
* - commandcooldown.restart43200
* - commandcooldown.reload43200
* - commandcooldown.save-all43200
Can you add Delay for the use of Commands ?
@falsevacuum
Thanks for trying to help, but the strings generated by the command preprocess events contain the "/" that you use for a command. For example, if I started it at index 0, it would return "/command" for "/command arg1" instead of "command" like it is supposed to.
Any plans to add warmups for commandss? Like having to wait 15 seconds without moving for a warp to go through.
How does this work with met essentials
Hey brosky,
Java Strings start at index 0.
Thx for this plugin =)
That would be possible of edit message In futur update plz ?
Hey Dude, thanks for this Amazing Plugin! I just suggest one thing i really miss! Global Cooldowns. For Example: If i have 2 warp points, one for PointA and the other for PointB. When i use /Warp PointA, the cooldown will also go for /warp PointB. If u could manage to do this it would be awesome!