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

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

  1. Offline


    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!

    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)


    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


    Cannot reproduce, so there is nothing to fix on my side.
  3. Offline


    So this is a plugin conflict?
  4. Offline


    Most probably.
  5. Offline



    Your plugin cannot disable /? command.

    Please take a look on it because this command disclosure all plugins running on a server

    EDIT: You can add /? to disabled.txt, but /?(anything) still works:


    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
    Last edited by a moderator: May 10, 2016
  6. Offline


    Confirmed, looks like /? and /help are once again not caught by bukkit routines I use (and have always used), I don't think I can help there sadly.
    There was a bug somewhere (bukkit OR minecraft) that the parser was too "greedy", so /stopblahblah was the same as /stop, which looks like being the same problem here.
  7. Offline



    Thanks for the help. I've disabled it under help.yml
  8. Offline


    Could you elaborate on that? I'm sure you're not the last with that problem and not many people can help themselves unfortunately.
  9. Offline



    Just put:

    - All

    under help.yml

  10. Offline


    You should also disable the // cmd(/ in disabled.txt). That activates the SuperPickaxe.

    Awesome plugin! :D

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
    Last edited by a moderator: May 10, 2016
  11. Offline


    Have you really just quoted a YEAR OLD post?
    Rickebo likes this.
  12. Offline


    Lol. :)
  13. Offline


    do i have to make a folder in plugins called PlgDisableCmd and then the txt in there or is there an autogenerated folder or do i just make the .txt file?
  14. Offline


    hey dude
    it's a really good plugin. I use that on my server and It's doing its work well. But it would be awesome if you could use that with MultiveseCore that you can use a command in one world but It's disabled in an other world.
    Hope you could do that.
    Greetings from Germany :D
  15. Offline


    So I made a folder in the plugins fold called PlgDisableCmd
    In side of that folder there is a text document that is called
    I have four commands listed there

    In that order and just like that.
    Everything is spelled right, yet nothing is blocked. I downloaded the one that blocked it for everyone.
    But nothing has been blocked.
    The plugin I'm blocking is ColorMe Because my staff keep renaming them selves without my permission.

    Also if you could make a plugin that ONLY changes the color of someones name, and has a .txt with peoples name on it who can use it, I would be forever greatful.
  16. Offline


    ITS HORRIBLE U CANT CONFIGURE WHAT GROUPS CANT DO WHAT COMMANDS!!! I WANT SOME GROUPS TO BE NOW ALLOWED TO USE f and /f but u cant configure that for certain groups or for anyone this plugin is bad dont get!!!!
  17. Offline


    Do you create the disabled.txt in the PlgDisableCmd FOLDER or the .zip?
  18. Offline


    It doesn't work for me. OPs still can /give. I have the disabled.txt in the jar folder.
  19. Offline


    Compatible with 1.2.5
  20. Offline


    i have not tried it yet, but could you put it so it stops commands for a persiffic player eg, a command like
    /blockcommandp <player> /<command>

    and also put commands like these
    /blockcommandnop /<command>
    this command could stop commands that if you are a non-op

    /blockcommanda /<command>
    this command could stop commands for all users

    also create groups eg (only the op can put you or take you out the group)
    /PDC creategroup <groupname>

    and you can stop commands for if you are in that group
    PDC Blockcommandg <groupname> /<command>

    just ideas
  21. Offline


    yea i'm interesting in command block which require player name, i dont want even ops to give gamemode to others ;).
  22. Offline


    Love the plugin. It works as advertised. I do have one problem with seeming random errors in the console:

    2012-05-05 10:50:43 [SEVERE] Could not pass event PlayerCommandPreprocessEvent to PlgDisableCmd
    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:459)
    at net.minecraft.server.NetServerHandler.handleCommand(NetServerHandler.java:814)
    at net.minecraft.server.NetServerHandler.chat(NetServerHandler.java:781)
    at net.minecraft.server.NetServerHandler.a(NetServerHandler.java:764)
    at net.minecraft.serverhook.NetServerHandlerProxy.a(NetServerHandlerProxy.java:140)
    at net.minecraft.server.Packet3Chat.handle(Packet3Chat.java:34)
    at net.minecraft.server.NetworkManager.b(NetworkManager.java:229)
    at net.minecraft.server.NetServerHandler.a(NetServerHandler.java:113)
    at net.minecraft.serverhook.NetServerHandlerProxy.a(NetServerHandlerProxy.java:83)
    at net.minecraft.server.NetworkListenThread.a(NetworkListenThread.java:78)
    at net.minecraft.server.MinecraftServer.w(MinecraftServer.java:551)
    at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:449)
    at net.minecraft.server.ThreadServerApplication.run(SourceFile:492)
    Caused by: java.lang.StringIndexOutOfBoundsException: String index out of range: -1
    at java.lang.String.substring(Unknown Source)
    at java.lang.String.substring(Unknown Source)
    at cz.Plague.bukkit.PlgDisableCmd.PlgDisableCmd$CommandPreprocessListener.onPlayerCommandPreprocess(PlgDisableCmd.java:39)
    at sun.reflect.GeneratedMethodAccessor133.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)
    ... 14 more

    Running Towny, TownyChat, bpermissions, LogBlock, WorldGuard, WorldEdit, Commandbook, McMMO, vault, register, questioner, mcbans, lwc, chestshop, iConomy, mcjobs

    Error happens if i have a empty disabled.txt or one with my disabled commands.

    Let me know if I need to provide more information so we can track this down.
  23. Offline


    The plugin works great! I am currently using it on my server.
    Great job on it
  24. is there any way to disable parts of a command? eg. disable /weather storm but not disable /weather sun
  25. Offline


    is not generating the folder with the disable.txt why?
  26. Offline


    make one
  27. Offline


    Plague, THANK YOU SO MUCH!!! I have been trying to get a plugin working like this for EVER!! It works absolutely great, and even blocks World Edit commands!! Way better then having to deal with Bukkit's poorly written permissions API.

    Btw, I modified the code just a little to allow certain users to be able to use commands. Like admins for example.
  28. Offline


    I have used this plugin for a while and before it used to work perfectly, But now 1 of the only 2 commands I really do not want used no longer gets disabled. I am trying to disable the command that shows what plugins are being used on the server. Is it something wrong with what I have done maybe?
  29. Offline


    Well that depends what changed in the time between "before" and "now" really.
    The only thing I can think of is to make sure my plugin gets loaded first, but "/plugins" is part of minecraft server itself, so that maybe will not help...
  30. Offline


    Is the folder that automatically generates called 'pluginmetrics'?

    How am I supposed to configure this?
  31. Offline


    Read the OP very slowly. BREATHE, MAN!

Share This Page