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
-
View User Profile
-
Send Message
Posted Dec 22, 2013@Zittla
Adding underscores does not work for me. Does it work for you?
-
View User Profile
-
Send Message
Posted Dec 6, 2013@LegitCrafter
you will need underscores like /time_set_day
-
View User Profile
-
Send Message
Posted Dec 3, 2013What 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?
-
View User Profile
-
Send Message
Posted Nov 18, 2013@ria80
This plugin still seems to work with the latest builds of 1.6.4 / 1.7.2 as well.
-
View User Profile
-
Send Message
Posted Nov 13, 2013This plugins is inactive ?
-
View User Profile
-
Send Message
Posted Oct 6, 2013-
View User Profile
-
Send Message
Posted Jul 27, 2013im 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?
-
View User Profile
-
Send Message
Posted Jun 27, 2013Is this plugin still being updated?
-
View User Profile
-
Send Message
Posted Jun 23, 2013Any info about having multiple commands?
-
View User Profile
-
Send Message
Posted Jun 10, 2013Awesome men, you are useful for my plugins ;)
-
View User Profile
-
Send Message
Posted Jun 9, 2013Hi 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.
-
View User Profile
-
Send Message
Posted May 22, 2013I 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.
-
View User Profile
-
Send Message
Posted May 21, 2013Almost 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
-
View User Profile
-
Send Message
Posted May 20, 2013Can you add Delay for the use of Commands ?
-
View User Profile
-
Send Message
Posted May 18, 2013@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.
-
View User Profile
-
Send Message
Posted May 16, 2013Any plans to add warmups for commandss? Like having to wait 15 seconds without moving for a warp to go through.
-
View User Profile
-
Send Message
Posted May 5, 2013How does this work with met essentials
-
View User Profile
-
Send Message
Posted May 1, 2013Hey brosky,
Java Strings start at index 0.
-
View User Profile
-
Send Message
Posted Apr 30, 2013Thx for this plugin =)
That would be possible of edit message In futur update plz ?
-
View User Profile
-
Send Message
Posted Apr 28, 2013Hey 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!