Solved Command integer help!

Discussion in 'Plugin Development' started by zakkinu2, Sep 24, 2013.

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

    zakkinu2

    Ok so i need a way so whenever a players uses a command i need to make sure that the args[0] is an integer. And how do i make it so if its an integer it checks if the number is smaller or equal to 20 but bigger or equal to 1
     
  2. Offline

    zakkinu2

    Assist Thanks so much!

    @Assists may i ask what parseInt means

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: Jun 4, 2016
  3. Offline

    Quantix

    Integer.parseInt() parses a string and turns it into an integer (if it can). If the string input can't be converted or parsed into an integer the method will throw the NumberFormatException.
     
  4. Offline

    zakkinu2

Thread Status:
Not open for further replies.

Share This Page