Let's take an example of snowballs. While you're *holding down* (PlayerInteractEvent::RIGHT_CLICK_AIR) snowballs, they'll keep decreasing in number until you release your hand off the snowballs, firing PlayerInteractEvent multiple times in a row. I want to do the same thing for when a player holds down an item other than snowballs. How would I do this? If I keep holding an item, it will trigger PlayerInteractEvent only once.
could u run a task and check the item, if they do call the interact event? EDIT: When they call the interact event the first time, could you run a task and check the item. If they have the same item call the interact event from the task?
maybe just quickly swap head into snowball and once they stopped(using a task to check) swap it back to head? not the best but should work
Of course, there's always a way but that's not what i want. I could have use my 999,999,999 workarounds to get this issue solved. It would be better to find whether it's handled by PocketMine/Client and then work on what would be the best solution, if there is any.
I've fixed this issue. PlayerActionPacket with $action ACTION_START_BREAK is spammed while the player holds down the item. Thank you for your answers though, pretty close.