Annoying problem with the new command system

Discussion in 'Plugin Development' started by Taco, Mar 3, 2011.

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

    Taco

    When I use a command from my plugin, it executes the command and then sends the command to the player that they just used. I.e. I use the command /godmode. It executes then sends me "/godMode" as it would with any other message. Is there a way to prevent this? It's quite annoying.
     
  2. Offline

    TAT

    I have the same problem. When using a command it just shows what you have written as usage in plugin.yml
     
  3. Offline

    Plague

    shouldn't you be able to set the sender?
     
  4. Offline

    Lavamike

    I think if you return false it will send the message in plugin.yml

    Try returning true after the command is finished.
     
  5. Offline

    Plague

    Oh you meant the HELP for the command? I thought the output of the command.
     
  6. Offline

    xZise

    Hello, normally it shouldn't printout “/godMode”, because bukkit don't change one letter on its own. So you have to define this text anywhere? So how does your plugin.yml look like? Also did you try this in the normal console or via the eclipse console (which got struggled here because of many new features). And I don't sure if any listener get's called when you register this command, but is somewhere in your code “/godMode”? A search should be easy to do.

    Fabian
     
  7. Offline

    Taco

    I think this is the problem, I'll try this later.

    @xZise That's how it's defined in my plugin.yml.
     
  8. Offline

    TAT

    Hmm found out I looked if the command was "/adminsonline" while I should look if the command was "adminsonline" (without the slash /) so of cause it would automatically return false.
    Now fixed and working :)
     
  9. Offline

    xZise

    If you return in onCommand() false it will print the usage message. So if the usagemessage is simply “/godMode”, than you have returned false.

    @TAT: I would recommend using the executors, if you register more than one command. Otherwise you won't have to check it.

    Fabian
     
  10. Offline

    TAT

    Right now it is working fine with one executor to two commands, but I will put that to my thoughts when I update and make more plugins :)
     
Thread Status:
Not open for further replies.

Share This Page