Solved Args Help

Discussion in 'Plugin Development' started by michael566, Jun 18, 2014.

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


    so I have a command /stats that shows them their stats, but I want to make a command /stats reset. But the problem is I already have a command that uses args[0] for a player name. So when I do /stats reset it thinks reset is a player. I tried doing if (args[0].equalsignorecase("reset")). But it doesn't work for some reason.
  2. Offline


    Try checking the arg[0] before checking/using as a player name
  3. Offline


    rfsantos1996 Hmm, ok that worked, but it then says an internal error occured, and the error says null.

    nvm it worked, just forgot a return statement.

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
    Last edited by a moderator: Jun 8, 2016
    rfsantos1996 likes this.
  4. please mark the thread as solved so people don't open it again ;)
Thread Status:
Not open for further replies.

Share This Page