diff --git a/src/main/java/net/coreprotect/listener/entity/EntityDeathListener.java b/src/main/java/net/coreprotect/listener/entity/EntityDeathListener.java index 0883812..a2c61fd 100644 --- a/src/main/java/net/coreprotect/listener/entity/EntityDeathListener.java +++ b/src/main/java/net/coreprotect/listener/entity/EntityDeathListener.java @@ -10,6 +10,7 @@ import org.bukkit.Bukkit; import org.bukkit.Color; import org.bukkit.Location; import org.bukkit.Material; +import org.bukkit.Registry; import org.bukkit.World; import org.bukkit.attribute.Attributable; import org.bukkit.attribute.Attribute; @@ -64,6 +65,8 @@ import org.bukkit.inventory.meta.ItemMeta; import org.bukkit.inventory.meta.LeatherArmorMeta; import org.bukkit.projectiles.ProjectileSource; +import com.google.common.collect.Lists; + import net.coreprotect.CoreProtect; import net.coreprotect.bukkit.BukkitAdapter; import net.coreprotect.config.Config; @@ -283,8 +286,7 @@ public final class EntityDeathListener extends Queue implements Listener { if (entity instanceof Attributable) { Attributable attributable = entity; - - for (Attribute attribute : Attribute.values()) { + for (Attribute attribute : Lists.newArrayList(Registry.ATTRIBUTE)) { AttributeInstance attributeInstance = attributable.getAttribute(attribute); if (attributeInstance != null) { List attributeData = new ArrayList<>();