Are the chances right?

Discussion in 'Spigot Plugin Development' started by Joshuak52, Jul 7, 2015.

  1. Why making a new Random everytime, utilize just one object. Another thing is - use seed for your randomness: System.currentTimeMillis.
    And nah, they are not equal chances - they would be if you random from the same range.
     
    • Agree Agree x 1
  2. When you create a Random object without a parameter for seed, it will be automatically seeded according to some algorithm with the current time.

    In theory your code may give all the rewards at once to the player. I don't know if this is intended behaviour, but I thought I'd mention it.
     
    #3 Rocoty, Jul 7, 2015
    Last edited: Jul 7, 2015