Started by
AInvisiblePerson
on
Topic category: Help with Minecraft modding (Java Edition)
I am currently working on a mod where a player has a hot potato and every session it resets to a random player, but I can't figure out how to choose a random player without there being a chance of no one getting the potato or more than one person getting it.
I just thought of a way to do it: set a true/false variable to false until it gives someone the potato. When it does, set the variable to true so it'll stop trying to give it to someone. Have a way to set the variable back to false, though.
Use the "for each player in current world" block in conjunction with FiveNights2161's post.