mirror of
https://github.com/PlayPro/CoreProtect.git
synced 2025-01-15 20:32:24 +01:00
Fixed entity deaths not always being logged in MC 1.19 and earlier (fixes #515)
This commit is contained in:
parent
053f7d5c7d
commit
d8ad48beb8
@ -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;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user