diff --git a/src/main/java/com/gmail/nossr50/util/Misc.java b/src/main/java/com/gmail/nossr50/util/Misc.java index f0e68db8a..d48dc31b1 100644 --- a/src/main/java/com/gmail/nossr50/util/Misc.java +++ b/src/main/java/com/gmail/nossr50/util/Misc.java @@ -13,6 +13,7 @@ import org.bukkit.block.BlockState; import org.bukkit.block.Furnace; import org.bukkit.entity.Entity; import org.bukkit.entity.HumanEntity; +import org.bukkit.entity.NPC; import org.bukkit.entity.Player; import org.bukkit.event.inventory.InventoryEvent; import org.bukkit.inventory.FurnaceInventory; @@ -60,7 +61,7 @@ public final class Misc { } public static boolean isNPCEntity(Entity entity) { - return (entity == null || entity.hasMetadata("NPC") || (mcMMO.isCombatTagEnabled() && entity instanceof HumanEntity && ((HumanEntity) entity).getName().contains("PvpLogger"))); + return (entity == null || entity.hasMetadata("NPC") || entity instanceof NPC || (mcMMO.isCombatTagEnabled() && entity instanceof HumanEntity && ((HumanEntity) entity).getName().contains("PvpLogger"))); } /**