ProtocolLib

3M Downloads

PacketType Update Health isn't working right

Ari24-cb24 opened this issue ยท 1 comments

commented

Describe the bug
So I need to receive the UPDATE_HEALTH package in order to check if the player died (I'm working on some morphing).
The problem: UPDATE_HEALTH is sometimes not firing if the players health is under or equals 0. The weird thing: Sometimes it works and sometimes it doesnt (I didn't change anything)

To Reproduce
Creating a PacketListener with Priority Highest and PacketType.Play.Server.UPDATE_HEALTH

Expected behavior
The PacketType.Play.Server.UPDATE_HEALTH should be firing if my health is under zero.

Version Info
https://pastebin.com/EHEWZAFu

Additional context
Add any other context about the problem here.

commented

I'm now using the PlayerDeathEvent. Couldn't use this before because of my code.

But it's still very strange that the Update Health Packet isnt being received sometimes if a player dies