PocketMine-MP
PocketMine-MP copied to clipboard
Fix for #4680 - /kill not actually killing
Introduction
Fixes /kill not functioning when player had more than 1000 health
Relevant issues
- Fixes #4680
Changes
API changes
N/A
Behavioral changes
/kill will now always kill the player
Backwards compatibility
N/A
Follow-up
N/A
Tests
In-game testing with absorption 255 + regen 255 + health boost 255 + resistance 255 results in player death
I don't know if pm4 is developing towards bedrock or java, or mixed... but as far as I remember, bedrock' /kill only deals massive damage and doesn't remove the entity.
I think it's best to go with what the user is expecting rather than matching either Bedrock or Java in particular. Killing the player is the expected result of using /kill, so by that logic it should be implemented this way.
I think it's best to go with what the user is expecting rather than matching either Bedrock or Java in particular. Killing the player is the expected result of using /kill, so by that logic it should be implemented this way.
+1 to this. Intuitively making sense is better than bug-for-bug parity with either version.
$player->attack(new EntityDamageEvent($player, EntityDamageEvent::CAUSE_SUICIDE, PHP_INT_MAX));