Get the used command-alias

Discussion in 'Plugin Development' started by TheE, Mar 21, 2013.

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

    TheE

    Let's say I have registered the command 'foo' together with an alias 'bar' in the plugin.yml. Is there any way to know if which of those two aliases was used to execute the command using only bukkit's standard onCommand()-method? Or would I be forced to register two commands and handle them as one in the plugin (which would mean I would abandon the whole standard process and reflect my commands into bukkit)?

    And before someone points out that this would not be needed at all: I would like to display sub-commands in my help menu together with the alias that was used and not only with the default one.
     
  2. Offline

    Darq

    The third parameter that onCommand takes, called "label", is the alias used.
     
  3. Offline

    TheE

    Exactly what I was searching for, thanks. Should have tried that earlier.
     
Thread Status:
Not open for further replies.

Share This Page