Plugin Command Help

Discussion in 'Plugin Development' started by hskrasek, May 24, 2012.

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

    hskrasek

    What I would like to do:
    Have multiple commands in the format /prefix <command> [arguments]

    What happened before:
    I tried having multiple commands in the plugin.yml but none of them had /iprefix and were just /<command>

    How I fixed it:
    Made the only command /prefix, and then check the first args (args[0]) for each seperate command. It works but if they screw up the arguments I have a country mile long If/IfElse/Else block from hell.

    My question:

    What is the correct way/best way to handle a predicament like this? Where if they use say /derp kill me it'll be registered as its own plugin with its logic and all? I hope this well worded, I tried to search for this but I couldn't even think of the right search terms and couldn't find anything.
     
  2. Could you post some code?
     
    ZeusAllMighty11 likes this.
  3. Offline

    hskrasek

Thread Status:
Not open for further replies.

Share This Page