From 0174c7b601d4b7759d402246fbcf0f2d218bdacd Mon Sep 17 00:00:00 2001 From: Joshua Date: Fri, 26 Feb 2021 12:23:07 -0600 Subject: [PATCH] sentinels npe fix for ticket 436 --- .../mythicmobs/skill/handlers/PlayerDamageSkillHandler.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/net/Indyuce/mmocore/comp/mythicmobs/skill/handlers/PlayerDamageSkillHandler.java b/src/main/java/net/Indyuce/mmocore/comp/mythicmobs/skill/handlers/PlayerDamageSkillHandler.java index 58704467..8f818ab4 100644 --- a/src/main/java/net/Indyuce/mmocore/comp/mythicmobs/skill/handlers/PlayerDamageSkillHandler.java +++ b/src/main/java/net/Indyuce/mmocore/comp/mythicmobs/skill/handlers/PlayerDamageSkillHandler.java @@ -19,7 +19,7 @@ public class PlayerDamageSkillHandler extends PassiveMythicMobSkillHandler { @EventHandler private void event(EntityDamageEvent e) { - if (e.getEntityType() == EntityType.PLAYER) + if (e.getEntityType() == EntityType.PLAYER && !e.getEntity().hasMetadata("NPC")) castSkill(PlayerData.get((Player) e.getEntity())); } }