Handling 'OnHealthChange' events without performance leaks

Forum Rewards
Every new forum post gives the author +10 coins. You can also reward great posts from other users.
Min donation: 10 coins Author gets 50%
I'm trying to write a script for a 'Rage' mechanic. Problem: if I check health every tick, the server might lag with 100+ entities. Is there a built-in event listener like 'entity.onHealthUpdate' that only triggers when a value actually changes?
Pretty sure there's an event handler for that. Checking every tick is definitely the wrong move lol. Check the docs for 'EntityValueListener'.

Post a Reply

Formatting: [b]bold[/b], [i]italic[/i], [u]underline[/u], [code]code[/code], [quote]quote[/quote]