PocketMine-MP icon indicating copy to clipboard operation
PocketMine-MP copied to clipboard

Fix for #4680 - /kill not actually killing

Open jasonw4331 opened this issue 3 years ago • 4 comments

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

jasonw4331 avatar Feb 05 '22 19:02 jasonw4331

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.

NTT1906 avatar Feb 05 '22 19:02 NTT1906

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.

jasonw4331 avatar Feb 05 '22 19:02 jasonw4331

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.

dktapps avatar Feb 05 '22 19:02 dktapps

$player->attack(new EntityDamageEvent($player, EntityDamageEvent::CAUSE_SUICIDE, PHP_INT_MAX));

ghost avatar Feb 08 '22 04:02 ghost