Solved Arg as command?

Discussion in 'Plugin Development' started by _Stamp_, May 15, 2016.

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


    So pretty much as the title says, I was wondering if its possible to have an argument also as a command, I have never used aliases before so not to sure if this is possible and how could I do it.

    Here's an example of what I mean...

    Player does /sc wb - Player : Welcome back
    Player does /wb - Player: Welcome back
  2. Offline

    timtower Administrator Administrator Moderator

    @_Stamp_ Aliases in the plugin.yml are only the word after the /
    You can just add commands though and change them arround internally.
  3. Offline


    I guess so, I might just keep my plugin so that you have to do /sc wb

    thanks anyway
    timtower likes this.
  4. Offline

    I Al Istannen

    A possible (but maybe quite dirty) solution is listening to the PlayerCommandPreProcess event and checking if what they entered equals the alias they set.
Thread Status:
Not open for further replies.

Share This Page