[MISC] PlgDisableCmd v2.0 - disable given commands [1.4]

Discussion in 'Archived: Plugin Releases' started by Plague, Feb 28, 2011.

  1. Offline

    Plague

    PlgDisableCmd - Disable given commands
    Version: v2.0

    Since there was some demand to disable some commands without the use of permissions, I come to the rescue :)
    Just create a file "plugins/PlgDisableCmd/disabled.txt" and put commands (without the / character) you want to disable there on separate lines. That's it!

    Features:
    Can disable any command, including hardcoded bukkit /help and /plugins or minecraft /give.

    Download (source code in the .jar)
    Download OP version (OPs can still use those commands)

    [​IMG]


    Changelog:
    Version 2.0
    • updated to new bukkit API
    Version 1.3
    • More aggressive code, should truly block all commands, even for plugins not respecting the right way to handle commands.
    Version 1.2
    • Craftbukkit 600 compatibility
    Version 1.1
    • Fixed a bug - plugin was not case-insensitive
    Version 1.0
    • Initial release
     
  2. Offline

    atomfitz

    Any chance you could make this work for specific command arguments as well?
    ie: if I were to add "herp derp" /herp and other arguments of /herp would work, but /herp derp would not
     
  3. Offline

    jinS

    Hi.. am a made disabled.txt file but don't work so enquire

    made file or memo?
     
  4. Offline

    baffu

    This has been asked before, could you please have world support. I would like to dissable a command for just one world.
    Thanks a bunch
    Baffu
     
  5. Offline

    Plague

    I don't understand the question.

    I'm not adding any more features, since this suits my current needs and I don't have time to support user requests.
     
  6. Offline

    jinS

    Plague
    I made a disabled.txt file, but it didn't work
     
  7. Offline

    Plague

    Then you must be doing something wrong or you have another plugin conflicting with this one.
     
  8. Offline

    joasiee

    Thank you :D
     
  9. Offline

    Plague

    update for new bukkit API
     
  10. Offline

    dafreo1

    Just a question, how am I able to add a space. Im trying to disable a few commands that have a space bar required e.g. /reload all. Ive tried stuff like reload_all and nothing seems to work. When I just type 'reload all' it doesnt register.
     
  11. Offline

    Plague

    You misunderstand the whole concept a bit.
    Command is always "reload". "all" is just an argument of that command. This simple plugin disables only commands as a whole.
     
  12. Offline

    chriskel299

    It said No commands disabled..I did this
    1.Put jar into plugins folder
    2.Created PlgDisableCmd Folder
    3.Created disabled.txt
    4.Edited the text file
    5.Start my server
    Then in the Cmd bat after everything loads up(Map and other stuff) Before saying done it says [PlgDisableCmd]loading PlgDisableCmd v2.0
    Then after that it says No Commands Disabled... :(
    Can u please tell me if im doing it all right??If no please Reply Asap
     
  13. Offline

    Plague

    Theoretically you could be on windows and the file is then called disabled.txt.txt since windows are stupid when naming files by default.
     
  14. Hmm can anyone confirm 2.0 works? I have upgraded, still on MC 1.1, but for us this is now letting commands through, didn't change config.
     
  15. Offline

    xtrea

    2.0 I used this plugin while on MC 1.1 and found no problems when used for a few commands.
     
  16. Offline

    SkyCraft

    Does this work on MC 1.2?
     
  17. Yes.
     
  18. Offline

    Royalgamer06

    Update for RB 1.2.3 please! Love your plugin! Thanks
     
  19. Offline

    Plague

    Did bukkit have another breaking change or you just have not tried it?
     
  20. Offline

    Royalgamer06

    not tried, but I tought all the outdated plugins will break...
     
  21. These aren't exactly the cutting edge in terms of plugins. They are simple tools for the base of your folder. They work.
     
  22. Offline

    Royalgamer06

    using 1.2.3 RB:

    2012-03-04 15:11:13 [SEVERE] Could not load 'plugins\PlgDisableCmd.jar' in folder 'plugins'
    org.bukkit.plugin.InvalidPluginException: java.lang.NoClassDefFoundError: org/bukkit/event/player/PlayerListener
    at org.bukkit.plugin.java.JavaPluginLoader.loadPlugin(JavaPluginLoader.java:148)
    at org.bukkit.plugin.SimplePluginManager.loadPlugin(SimplePluginManager.java:287)
    at org.bukkit.plugin.SimplePluginManager.loadPlugins(SimplePluginManager.java:211)
    at org.bukkit.craftbukkit.CraftServer.loadPlugins(CraftServer.java:207)
    at org.bukkit.craftbukkit.CraftServer.<init>(CraftServer.java:183)
    at net.minecraft.server.ServerConfigurationManager.<init>(ServerConfigurationManager.java:53)
    at net.minecraft.server.MinecraftServer.init(MinecraftServer.java:156)
    at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:425)
    at net.minecraft.server.ThreadServerApplication.run(SourceFile:490)
    Caused by: java.lang.NoClassDefFoundError: org/bukkit/event/player/PlayerListener
    at java.lang.ClassLoader.defineClass1(Native Method)
    at java.lang.ClassLoader.defineClass(Unknown Source)
    at java.security.SecureClassLoader.defineClass(Unknown Source)
    at java.net.URLClassLoader.defineClass(Unknown Source)
    at java.net.URLClassLoader.access$100(Unknown Source)
    at java.net.URLClassLoader$1.run(Unknown Source)
    at java.net.URLClassLoader$1.run(Unknown Source)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.net.URLClassLoader.findClass(Unknown Source)
    at org.bukkit.plugin.java.PluginClassLoader.findClass(PluginClassLoader.java:41)
    at org.bukkit.plugin.java.PluginClassLoader.findClass(PluginClassLoader.java:29)
    at java.lang.ClassLoader.loadClass(Unknown Source)
    at java.lang.ClassLoader.loadClass(Unknown Source)
    at cz.Plague.bukkit.PlgDisableCmd.PlgDisableCmd.<init>(PlgDisableCmd.java:23)
    at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
    at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)
    at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source)
    at java.lang.reflect.Constructor.newInstance(Unknown Source)
    at org.bukkit.plugin.java.JavaPluginLoader.loadPlugin(JavaPluginLoader.java:144)
    ... 8 more
    Caused by: java.lang.ClassNotFoundException: org.bukkit.event.player.PlayerListener
    at java.net.URLClassLoader$1.run(Unknown Source)
    at java.net.URLClassLoader$1.run(Unknown Source)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.net.URLClassLoader.findClass(Unknown Source)
    at org.bukkit.plugin.java.PluginClassLoader.findClass(PluginClassLoader.java:41)
    at org.bukkit.plugin.java.PluginClassLoader.findClass(PluginClassLoader.java:29)
    at java.lang.ClassLoader.loadClass(Unknown Source)
    at java.lang.ClassLoader.loadClass(Unknown Source)
    ... 27 more
     
  23. Offline

    Plague

    please update the plugin before posting errors
     
  24. Offline

    dmbardal

    I thought this plugin didnt work.
    Tried to reinstall it, checked the .txt several times. Couldnt understand what was wrong.

    Then I checked the Essentials plugin and realised they have the option to disable commands and overwrote the
    disabled commands in PlgDisableCmd.
     
    Courtney likes this.
  25. Offline

    Swang

    Just tried it on Beta Build 2034 for 1.23 and it worked perfectly just like it did before R5. Thanks for the mod.
     
  26. Offline

    ThoLav

    Hi,

    it would be fine to have a config.yml, with an customizable error message. Now no message is shown, if a command ist in disabled.txt. So most of players knows this command exists.

    Code:
    message: Unknown command. Type "help" for help
    
    Running on: Beta Build 2034 for 1.23
     
  27. Offline

    HermyHerman

    It doesn't work. You put the "disabled.txt" text file in the PlgDisableCmd folder? I did that. Didn't work. Help? :D
     
  28. Offline

    ThoLav

    Hi,

    the commands are disabled. They are in disabled.txt.

    But if a player uses an disabled command, for example "/weather", there is no error message send as result. Normally you get the message: 'Unknown command. Type "help" for help' if the command didn't exist.
     
  29. Offline

    Fuzzlr

    It's working great but every few minutes or so I get this error:

    Code:
     [SEVERE] Could not pass event PlayerCommandPreprocessEvent to PlgDisableCmd 
     
  30. Offline

    Plague

    That looks like a bukkti problem for me, since it cannot tell me something which I ask for, really don't know why.
     
  31. Offline

    Fuzzlr

    This error has occured over 100,000 times since we implemented PlgDisableCmd. Will this be fixed or will we have to find a new plugin?
     

Share This Page