Solved ChanceAPI??

Discussion in 'Spigot Plugin Development' started by PCPSells, May 22, 2016.

  1. What I am looking for, is if I do
    if a player right-clicks an item it has a chance to return a method.
    How would I do the chances?
     
  2. Use the Java Random.
     
    • Like Like x 1
  3. Can you provided a coded example? That'd help a ton. <3
     
  4. Code (Text):


       private static Random rnd = new Random();

    //do stuff with rnd#

       
     
     
    • Like Like x 1
  5. Appreciate it a ton man! Have a good on
    /////////////
    Title changed, Solved.