Fixed entity deaths not always being logged in MC 1.19 and earlier (fixes #515)

This commit is contained in:
Intelli 2024-05-02 13:03:53 -06:00
parent 053f7d5c7d
commit d8ad48beb8
1 changed files with 2 additions and 2 deletions

View File

@ -122,11 +122,11 @@ public final class EntityDeathListener extends Queue implements Listener {
e = isCommand ? "#command" : "";
}
List<DamageCause> validDamageCauses = Arrays.asList(DamageCause.KILL, DamageCause.POISON, DamageCause.THORNS, DamageCause.MAGIC, DamageCause.WITHER);
List<DamageCause> validDamageCauses = Arrays.asList(DamageCause.SUICIDE, DamageCause.POISON, DamageCause.THORNS, DamageCause.MAGIC, DamageCause.WITHER);
boolean skip = true;
EntityDamageEvent.DamageCause cause = damage.getCause();
if (!Config.getConfig(entity.getWorld()).SKIP_GENERIC_DATA || (!(entity instanceof Zombie) && !(entity instanceof Skeleton)) || validDamageCauses.contains(cause)) {
if (!Config.getConfig(entity.getWorld()).SKIP_GENERIC_DATA || (!(entity instanceof Zombie) && !(entity instanceof Skeleton)) || (validDamageCauses.contains(cause) || cause.name().equals("KILL"))) {
skip = false;
}