.

Discussion in 'Plugin Development' started by elementalgodz11, Nov 12, 2013.

Thread Status:
Not open for further replies.
  1. Offline

    elementalgodz11

  2. Offline

    exload

    I am not sure if this is the issue, but you are creating a new instance of MuteAllCommand each time you use it. This is generally a bad idea. Just create one instance of it and use it in each method.

    Code:java
    1. MuteAllCommand mute = new MuteAllCommand();
    2. pm.registerEvents(mute, this);
    3. getCommand("disablechat").setExecutor(mute);
    4. getCommand("enablechat").setExecutor(mute);


    Is it in the plugin.yml ? I believe if it's not then you would have an error when you start up anyways.

    Also note that you did name the command "enablechatchat" with two 'chats' not just "enablechat ". I don't know if you meant to do that or if you already fixed that but that would definitely be an issue XD

    Yes. http://jd.bukkit.org/rb/doxygen/df/d08/namespaceorg_1_1bukkit_1_1event.html

    Seeing as that is not a Bukkit command I cannot tell you exactly. The plugin that is using that command may have a way but it more than likely won't.

    I would recommend that you listen for the PlayerCommandPreprocessEvent and cancel the event if the player does the command /kill and if the chat lock is on.

    Create a /heal command?

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: Jun 5, 2016
Thread Status:
Not open for further replies.

Share This Page