Open zp4rker opened 3 days ago
I thought it intentionally was different to vanilla behavior - this change would also break /kill bypassing god mode iirc
Thanks for pointing that out, it does indeed break when in god mode. If older versions had a damage cause, could just use that but doesn't seem they do. Other solution I can think of is to check for Float.MAX_VALUE
since I can't think of any example of something other than /kill
using that value.
Information
This PR fixes #5842.
Details
Proposed fix:
Damageable#setHealth(double)
/minecraft:kill
usesEnvironments tested:
OS: Windows 11
Java version: Corretto-21.0.3.9.1
Demonstration:![image](https://github.com/EssentialsX/Essentials/assets/13144755/0af1b38d-2bbd-4b0d-96d2-8ae5719269e8)
Triggers
minecraft:entity_hurt_player
which was previously not being triggered as mentioned in #5842