mirror of
https://github.com/hyperdefined/ToolStats.git
synced 2025-12-07 21:25:00 +00:00
ignore void and /kill damage
This commit is contained in:
@@ -53,6 +53,13 @@ public class EntityDamage implements Listener {
|
||||
return;
|
||||
}
|
||||
LivingEntity livingEntity = (LivingEntity) event.getEntity();
|
||||
|
||||
// ignore void and /kill damage
|
||||
EntityDamageEvent.DamageCause cause = event.getCause();
|
||||
if (cause == EntityDamageEvent.DamageCause.SUICIDE || cause == EntityDamageEvent.DamageCause.VOID) {
|
||||
return;
|
||||
}
|
||||
|
||||
// mob is going to die
|
||||
if (livingEntity.getHealth() - event.getFinalDamage() <= 0) {
|
||||
// a player is killing something
|
||||
|
||||
Reference in New Issue
Block a user