TF-EssentialsX/Essentials
pop4959 07e2fe3af1
Improve suicide and kill commands (#3388)
Fixes #3189 

This PR makes improvements to the suicide and kill commands, namely:
1) Call `EntityDamageEvent` with damage equal to `Float.MAX_VALUE`, which is the amount that is inflicted by `/minecraft:kill`.
2) Removes the calls to `Damageable::damage` which ends up damaging the player with `DamageSource.GENERIC`, and later causing another `EntityDamageEvent` where as a result the last damage cause gets set to `EntityDamageEvent.DamageCause.CUSTOM`. Thus, the `EntityDamageEvent` that Essentials calls gets rendered useless when someone tries to get the damage cause of the player in `PlayerDeathEvent`. Setting health to zero forcibly kills the player without causing damage.
3) Add `getTabCompleteOptions` to the suicide command, as it currently incorrectly suggests players.
2020-07-01 22:04:46 +01:00
..
src Improve suicide and kill commands (#3388) 2020-07-01 22:04:46 +01:00
test/com/earth2me/essentials Update to 1.16.1 (#3408) 2020-06-27 12:17:35 -07:00
pom.xml Update to 1.16.1 (#3408) 2020-06-27 12:17:35 -07:00