diff --git a/src/main/java/net/citizensnpcs/util/NMS.java b/src/main/java/net/citizensnpcs/util/NMS.java index 60e0250c1..f4701b867 100644 --- a/src/main/java/net/citizensnpcs/util/NMS.java +++ b/src/main/java/net/citizensnpcs/util/NMS.java @@ -180,7 +180,7 @@ public class NMS { } private static Constructor getCustomEntityConstructor(Class clazz, EntityType type) throws SecurityException, - NoSuchMethodException { + NoSuchMethodException { Constructor constructor = ENTITY_CONSTRUCTOR_CACHE.get(clazz); if (constructor == null) { constructor = clazz.getConstructor(World.class); @@ -312,7 +312,7 @@ public class NMS { radius *= radius; final org.bukkit.World world = location.getWorld(); for (Player ply : Bukkit.getServer().getOnlinePlayers()) { - if (ply == null || world != ply.getWorld() || (from != null && ply.canSee(from))) { + if (ply == null || world != ply.getWorld() || (from != null && !ply.canSee(from))) { continue; } if (location.distanceSquared(ply.getLocation(PACKET_CACHE_LOCATION)) > radius) {