Changing options in random number generator.

Discussion in 'Plugin Development' started by Stone_Tigris, Jan 10, 2012.

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

    Stone_Tigris

    Hey, made my first plugin Random Number, which creates random numbers between 1 and 6 when you enter the command /rn. Someone else had the idea that if you type /rn <first number> <second number> it would create a random number between the two numbers you entered. I could quite easily do this but the only way I can think of doing it was creating loads of arguments, which would be long winded and not unlimited (To an extent). Is there a quick way that anyone knows? Thanks.

    - Stone
     
  2. Offline

    Chiller

    random.nextInt(max - min) + min;
     
    RFUDEO9EH likes this.
  3. Offline

    Stone_Tigris

    I shall try that now, thanks.
     
Thread Status:
Not open for further replies.

Share This Page