Sub-commands [SOLVED]

Discussion in 'Plugin Development' started by civ77, Jan 20, 2012.

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

    civ77

    Could someone link me to source code containing a good example of sub-commands or a tutorial on this? By sub commands I mean commands with an argument that is used to entirely change the functionality of the command (i.e. /pluginname command1 and /pluginname command2).
     
  2. Offline

    tommykins20

    Please edit this thread with more detail. I kind of know what you meant but please explain in more detail.
     
  3. Offline

    civ77

    Bump: almost any source code will do please link me.
     
  4. Offline

    wwsean08

    how about you start writing code and when you have a problem post the problem, people aren't gonna just write out your code for you, I recomend looking at the bukkit wiki for plugin devs.
     
  5. Offline

    surtic

  6. Offline

    civ77

    I can't see where you are declaring your commands in your plugin.yml???

    Edit: NVM
     
  7. Offline

    surtic

    you dont need to declar the commands :) you can make this in the code.

    you had a CommandManager the Manage :) all the Commands.

    PlayerLister for onPlayerCommand
    https://github.com/phaed420/SimpleC...d/simpleclans/listeners/SCPlayerListener.java

    CommandManager
    https://github.com/phaed420/SimpleC...haed/simpleclans/managers/CommandManager.java

    Commands looks like this... https://github.com/phaed420/SimpleC...th/phaed/simpleclans/commands/BanCommand.java

    And dont forget to register the Command Event for the PlayerListener :) then it works grate and you can easy make sub sub sub commands or what ever you want.
     
Thread Status:
Not open for further replies.

Share This Page