I would like to have a feature where staff could enable a staff mode and get special features. I would like to make it so staff can click the rod and randomly teleport to a player. How would I make it so it teleport them to a completely random player?
I don't really understand what the place you linked me to is trying to say, can you please elaborate?
You create a Random object, which contains a nextInt(x, y) method. It gives you a random number between x (inclusive) and y (exclusive). x would always be 0, y would be the amount of players online. Say you have 10 players online, the method call would be random.nextInt(0, 10) which would return a number 0-9. 0 = player 1, 9 = player 10.
Code (Java): Random rand = new Random(); int index = rand.nextInt(Bukkit.getOnlinePlayers().size()); Player p = Bukkit.getOnlinePlayers().get(index);