diff --git a/main/src/main/java/net/citizensnpcs/npc/CitizensNPC.java b/main/src/main/java/net/citizensnpcs/npc/CitizensNPC.java index 3edd54858..37819aef3 100644 --- a/main/src/main/java/net/citizensnpcs/npc/CitizensNPC.java +++ b/main/src/main/java/net/citizensnpcs/npc/CitizensNPC.java @@ -410,10 +410,8 @@ public class CitizensNPC extends AbstractNPC { } else if (data().has(NPC.Metadata.AGGRESSIVE)) { NMS.setAggressive(entity, data(). get(NPC.Metadata.AGGRESSIVE)); } - if (SUPPORT_NODAMAGE_TICKS) { - entity.setNoDamageTicks(data().get(NPC.Metadata.SPAWN_NODAMAGE_TICKS, - Setting.DEFAULT_SPAWN_NODAMAGE_DURATION.asTicks())); - } + entity.setNoDamageTicks(data().get(NPC.Metadata.SPAWN_NODAMAGE_TICKS, + Setting.DEFAULT_SPAWN_NODAMAGE_DURATION.asTicks())); } if (requiresNameHologram() && !hasTrait(HologramTrait.class)) { addTrait(HologramTrait.class); @@ -614,16 +612,10 @@ public class CitizensNPC extends AbstractNPC { private static final SetMultimap CHUNK_LOADERS = HashMultimap.create(); private static boolean SUPPORT_ATTRIBUTES = false; private static boolean SUPPORT_GLOWING = false; - private static boolean SUPPORT_NODAMAGE_TICKS = false; private static boolean SUPPORT_PICKUP_ITEMS = false; private static boolean SUPPORT_SILENT = false; private static boolean SUPPORT_USE_ITEM = true; static { - try { - Entity.class.getMethod("setNoDamageTicks", int.class); - SUPPORT_NODAMAGE_TICKS = true; - } catch (NoSuchMethodException | SecurityException e) { - } try { Entity.class.getMethod("setGlowing", boolean.class); SUPPORT_GLOWING = true;