Command Error

Discussion in 'Plugin Development' started by vaiquero, Apr 9, 2011.

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

    vaiquero

    Hey guys, was just making my first plugin and when I came to testing it, I kept getting an internal error occured. It uses permission nodes, etc etc. It may also be a mistake from the YML file I made.

    EDIT: Solved
     
  2. Offline

    Sammy

    This is wrong:
    Code:
    if (args[0].equalsIgnoreCase("/armor")
    
    The command comes from the "Command command"
    so:

    Code:
     if (command.equals("armor")) {
       if (args[0].equalsIgnoreCase("leather")){
        //your code
       }
    }
    Everything that comes after the armor is on args[x]
     
  3. Offline

    vaiquero

    Thank you so much, since I am new to the API and due to the tutorials being outdated, I did not know about this =/.
     
  4. Offline

    Sammy

    No problem, have a nice one ! :)
     
Thread Status:
Not open for further replies.

Share This Page