So My problem is I want to see the series of clicks a player does; like Right Click then Left Click then Right Click So We all know how to do using PlayerInteractEvent but multiple clicks are the issue. What can I do to solve them?
You could have 2 different lists, once someone does Right Click, add them to the first one, if they're in the first one, and they left click, add them to the 2nd one. If they rightclick while they're in the 2nd one (and also in first one), do stuff. This is probably very inefficient, but it's something I thought of right away once I saw this post
@SuperSniper @Herowise Use a map instead. The keys will be the Player's UUID and the value will be a String. The String will be a series of either "R" for right, or "L" for left. After the string has a length of ___, split the string at "" (meaning split each at each character) and check what the order is.
@SuperSniper You can use a map as well to avoid shifting between lists. EDIT: Scratch that. Had the page loaded for a while and that didn't include @Zombie_Striker 's post...