CommandLimiter - Limit the commands on your server![CodeEx]
=== NOTE: For all intents and purposes this plugin is inactive, though for the life of me I can't figure out how to manually set it as an inactive project, so I have put this notice here for all to read. Sorry about this! Maybe eventually I will come back to it but for now I simply do not have the time. ===
CommandLimiter is the first plugin made by CodeEx team. We were looking around on Bukkit Dev and asking other server owners about what kind of plugin they wanted/needed. After extensive research we believe(hope :P) this may be the first command limiting plugin of its kind released publicly.
Description:
CommandLimiter allows server owners to define a command and how many times it may be used by players on the server. It is very simple to use and very basic even if its your first time working with a properties file or running your bukkit server. Simply place the plugin in the plugins folder and start your server!
NOTE: If you wish to use the command cost function you MUST have vault installed on your server. Get it here: Vault BukkitDev
Features:
- Very easy to configure
- Very easy to set-up and install
- Lightweight data storage, no databases needed
- Configurable messages such as error message, used once message, and no more uses message
- Can set the amount of times each command can be used in the properties
- ANY command can be limited! Even commands with arguments! (Such as /cl reload, etc)
- In-game commands for easily reloading the plugin or purging(resetting) a users data
- Supports permissions! (Tested with BukkitPermissions, should work with all though)
- Allows individual edits to the data via commands! (/cl setlimit)
- NOW WITH v2.4 you can make commands cost money as well! (Uses Vault)
- NOW WITH v2.4 you can set individual cooldown for commands!!
Commands and Permissions:
Permissions
- cl.* description: gives access to all CommandLimiter commands(NOT INCLUDING cl.ignore!)
- cl.reload description: gives access to reload command.
- cl.purge description: gives access to purge command.
- cl.setlimit description: gives access to set command.
- cl.info description: gives access to info command.
- cl.ignore description: plugin completely ignores the group/player with this permission.
Commands
/cl reload - reloads the plugin. You can make any changes to properties file such as adding new commands and use this command to reload everything without having to delete the data file.
/cl purge [name] - RESETS the player's data to the defaults defined in the properties file. Purge might not have been the best name for this command as it is somewhat misleading.
/cl info [name] - shows the number of uses the player has left for every command.
/cl setlimit [name] [command] [limit] - sets the limit for a certain command for a player.
KEEP IN MIND THAT IF YOU ARE OP YOU CAN USE THESE COMMANDS WITHOUT THE NODES LIKE ANY OTHER PLUGIN.
If you are upgrading from v2.1 or lower to v2.4 you MUST delete your entire CommandLimiter folder with database inside for it to function properly!! This is due to the changes made to the structure of the database.
Properties file explained:
Visit: This link
Current bugs:
No bugs have yet been reported :D
To-Do list:
- Look into adding more customizability to messages
- add per group limiting
- add option to have some commands unlimited use and some limited
Changelog:
Version 2.4.2 - Released by JazzKr
- Updated to new event listening system, hopefully will keep it compatible for R5.. if not expect another update soon.
- Note: Overhaul is planned soon.. just as soon as I get some time!
Version 2.4.1 - Released by JazzKr
- Added feature where you can pay once to use a command forever (note: if you delete CL.data this will reset and you will have to pay again!)
- General bug fixes
Version 2.4 - Released by lookatmego and JazzKr
- ADDED cooldown support!
- ADDED economy support! (via vault, so it is now a softdepend)
- Modified entire data storage system to accommodate new features introduced
- Reconstructed many commands to support changes to storage system
- More configurable properties added!
- Changed /cl set to /cl setlimit so other commands for setting cooldown and cost can be added later
- Fixed command handling bug
- General bug fixes
Version 2.1.1 - Release by JazzKr
- Fixed stupid mistake I made with purge command, thanks to lookatmego for catching it!!
Version 2.1 - Release by JazzKr
- Rewrote the way it refreshes the data, now it will also 'trim' so commands that were previously in use are removed from data
- Improved the way it recognizes commands, now if a 'base' command is blocked such as /cl then it will block all commands in that tree (/cl set, /cl purge, etc, any commands that start with /cl)
- Commands with arguments can now be blocked, added a note in properties file that explains how to do this, basically spaces in properties file must have a preceding backslash to them
- Fixed a few issues with the text colouring not showing up the way it should be (if anyone sees any instances of this please leave a comment, didn't have time to go through all colour entries, assuming they are correct until proven wrong)
- Works with CraftBukkit 1.1-R1 as of January 14th, 2012
Version 2.0 - Release by lookatmego
- Added custom messages and colors to properties
- Added commands and permissions and super node
- Added ability to set, purge, and view a player's info
- Added ability to reload plugin
- Redefined way properties file is created
- Cleaned up code and in-game messages
- Cleaned up various debug console messages
Version 1.0 - Release by Jazzkr
- Pre-release of plugin
- Early testing
- Added the properties file
error with the plugin, pls help me :S
Really need that plugin
Do the commands reset after a certian ammount of time? Or after they use the command so many times you cant use it ever again.
Does not block multiple char cases
if blocking /stack is enabled /Stack and the 30 other versions aren't blocked.
Demnit :( Please make a updated version! :D
UPDATE
PLEASE UPDATE I NEED THIS PLUGIN!!!!!
Is there a way to limit a command globally and not by user? Like, make it so /home can only be used once by everyone, but not have to execute the command to limit it on every user
Ok thanks for aswering jazzkr very kind :)
@Mayhem777
Unfortunately no because I have been busy with other projects, writing custom plugins for a server I work with. It is worth mentioning that there is another plugin that has this functionality now called BoosCooldown maintained by LordBoos who has posted below me in this comment section, so if you want command limiting functionality then you may want to use that plugin as I will be setting this to inactive since I honestly don't have much time anymore to update it... Sorry!
No updates?
is there a way to make this apply to ops as well?
PermissionsBukkit is broken for CB 1.2.3, so in order to give people access to many commands I want them to have, I must op them. I then set the price exorbitantly high, as in 10^16 ish, to prevent them from doing things like "/stop," "/money give," "/money set," etc.
Or am I just going to have to go with a new permissions system...?
@LordBoos
It's being reactively maintained but not developed... As in if anything breaks we'll fix it but no new features planned for the time being due to time constraints. Feel free to implement command limiting into your plugin though!
If not, I'm planning to implement command limiting to my plugin boosCooldowns, please reply.
Is this plugin still in development?
2012-03-04 16:18:13 [SEVERE] Could not pass event PlayerCommandPreprocessEvent to CommandLimiter org.bukkit.event.EventException at org.bukkit.plugin.java.JavaPluginLoader$1.execute(JavaPluginLoader.java:303) at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.java:62) at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.java:441) at net.minecraft.server.NetServerHandler.handleCommand(NetServerHandler.java:811) at net.minecraft.server.NetServerHandler.chat(NetServerHandler.java:778) at net.minecraft.server.NetServerHandler.a(NetServerHandler.java:761) at net.minecraft.server.Packet3Chat.handle(Packet3Chat.java:33) at net.minecraft.server.NetworkManager.b(NetworkManager.java:229) at net.minecraft.server.NetServerHandler.a(NetServerHandler.java:112) at net.minecraft.server.NetworkListenThread.a(NetworkListenThread.java:78) at net.minecraft.server.MinecraftServer.w(MinecraftServer.java:554) at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:452) at net.minecraft.server.ThreadServerApplication.run(SourceFile:490) Caused by: java.lang.NullPointerException at net.insomniacraft.CommandLimiter.CLPlayerListener.onPlayerCommandPreprocess(CLPlayerListener.java:95) at sun.reflect.GeneratedMethodAccessor112.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) at org.bukkit.plugin.java.JavaPluginLoader$1.execute(JavaPluginLoader.java:301) ... 12 more
CommandLimiter version 2.4.2
CraftBukkit version b2033 (MC: 1.2.3)
EDIT error was to do with my config changing the limit to false
@lookatmego
Hey, its your plugin compatible with the new R4 event system? It has a chance of break in R5 if not!
@Crayder
hmmm not sure man ill try to figure something out:/
@lookatmego Until you add the functionality, how should I omit a value that I don't need? See this comment: @Crayder
@nurwin22
We MAY add that as we already had a comment from the owner of boosCooldowns thinking we copied his plugin. However we dealt with that and dont want another confusion on our hands. I suggest you use another plugin for warm ups on the side:)
this is awesome! thanks guys
could you add warmups to commands as well?
i know there might be some controversy with boosCooldowns, but it would be really awesome to have all my command options in one plugin (since i was originally interested in this for just the command limiting)
keep up the great work!