onCommand annoying bit.

Discussion in 'Plugin Development' started by flyslasher, Mar 5, 2011.

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

    flyslasher

    When i was imaking my plugin to try and use the new onCommand method, i used
    Code:
    {
    player.sendMessage( command.toString() );
    }
    as a test but now that I got it all working and added all my commands, everytime I use the plugin it does the code above, where it sends the player the command that was used. I deleted the plugin in the plugins folder and when I reloaded the plugins it still thought my plugin was there. After a server restart, this happens!
     
  2. Offline

    Cheesier

    I need more that that, post your whole onCommand(), your Plugin.yml file and tell me what command did you try to use ?
     
  3. Offline

    Samkio

    return true;
    ? :eek: i have no idea what was said.
     
  4. Offline

    Cheesier

    He haven't told me more that he told you :)
     
  5. Offline

    flyslasher

    Umm, when ever I use a command, it recognizes but it sends the player the command they said. Its doing this with all of them but I have learned that return true fixes it. Another question tho is how do I make it trigger on an existing command with out overriding it?
     
  6. Offline

    Plague

    return false in onCommand means, that you have not accepted it as valid. In that case bukkit prints the "usage" to the player so he can use it right.
     
Thread Status:
Not open for further replies.

Share This Page