mirror of
https://github.com/CitizensDev/Citizens2.git
synced 2024-11-21 18:15:51 +01:00
Fix packet sending
This commit is contained in:
parent
1413951b00
commit
eb6665900b
@ -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) {
|
||||
|
Loading…
Reference in New Issue
Block a user