Fix packet sending

This commit is contained in:
fullwall 2014-03-12 16:23:12 +08:00
parent 1413951b00
commit eb6665900b
1 changed files with 2 additions and 2 deletions

View File

@ -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) {