Skip to content

Commit

Permalink
Run cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
fullwall committed Dec 10, 2022
1 parent b243d96 commit 46b18ee
Show file tree
Hide file tree
Showing 14 changed files with 14 additions and 49 deletions.
Expand Up @@ -83,9 +83,7 @@ public void a(Entity entity, float strength, double dx, double dz) {

@Override
protected boolean a(EntityHuman entityhuman, EnumHand enumhand, ItemStack itemstack) {
return npc == null || !npc.isProtected()
? super.a(entityhuman, enumhand, itemstack)
: false;
return npc == null || !npc.isProtected() ? super.a(entityhuman, enumhand, itemstack) : false;
}

@Override
Expand Down
Expand Up @@ -1746,10 +1746,7 @@ public static void sendPacketsNearby(Player from, Location location, Collection<
radius *= radius;
final org.bukkit.World world = location.getWorld();
for (Player player : CitizensAPI.getLocationLookup().getNearbyPlayers(location, radius)) {
if (world != player.getWorld() || (from != null && !player.canSee(from))) {
continue;
}
if (location.distanceSquared(player.getLocation(PACKET_CACHE_LOCATION)) > radius) {
if (world != player.getWorld() || (from != null && !player.canSee(from)) || (location.distanceSquared(player.getLocation(PACKET_CACHE_LOCATION)) > radius)) {
continue;
}
for (Packet<?> packet : packets) {
Expand Down
Expand Up @@ -1810,10 +1810,7 @@ public static void sendPacketsNearby(Player from, Location location, Collection<
radius *= radius;
final org.bukkit.World world = location.getWorld();
for (Player player : CitizensAPI.getLocationLookup().getNearbyPlayers(location, radius)) {
if (world != player.getWorld() || (from != null && !player.canSee(from))) {
continue;
}
if (location.distanceSquared(player.getLocation(PACKET_CACHE_LOCATION)) > radius) {
if (world != player.getWorld() || (from != null && !player.canSee(from)) || (location.distanceSquared(player.getLocation(PACKET_CACHE_LOCATION)) > radius)) {
continue;
}
for (Packet<?> packet : packets) {
Expand Down
Expand Up @@ -1820,10 +1820,7 @@ public static void sendPacketsNearby(Player from, Location location, Collection<
radius *= radius;
final org.bukkit.World world = location.getWorld();
for (Player player : CitizensAPI.getLocationLookup().getNearbyPlayers(location, radius)) {
if (world != player.getWorld() || (from != null && !player.canSee(from))) {
continue;
}
if (location.distanceSquared(player.getLocation(PACKET_CACHE_LOCATION)) > radius) {
if (world != player.getWorld() || (from != null && !player.canSee(from)) || (location.distanceSquared(player.getLocation(PACKET_CACHE_LOCATION)) > radius)) {
continue;
}
for (Packet<?> packet : packets) {
Expand Down
Expand Up @@ -1937,10 +1937,7 @@ public static void sendPacketsNearby(Player from, Location location, Collection<
radius *= radius;
final org.bukkit.World world = location.getWorld();
for (Player player : CitizensAPI.getLocationLookup().getNearbyPlayers(location, radius)) {
if (world != player.getWorld() || (from != null && !player.canSee(from))) {
continue;
}
if (location.distanceSquared(player.getLocation(PACKET_CACHE_LOCATION)) > radius) {
if (world != player.getWorld() || (from != null && !player.canSee(from)) || (location.distanceSquared(player.getLocation(PACKET_CACHE_LOCATION)) > radius)) {
continue;
}
for (Packet<?> packet : packets) {
Expand Down
Expand Up @@ -2075,10 +2075,7 @@ public static void sendPacketsNearby(Player from, Location location, Collection<
radius *= radius;
final org.bukkit.World world = location.getWorld();
for (Player player : CitizensAPI.getLocationLookup().getNearbyPlayers(location, radius)) {
if (world != player.getWorld() || (from != null && !player.canSee(from))) {
continue;
}
if (location.distanceSquared(player.getLocation(PACKET_CACHE_LOCATION)) > radius) {
if (world != player.getWorld() || (from != null && !player.canSee(from)) || (location.distanceSquared(player.getLocation(PACKET_CACHE_LOCATION)) > radius)) {
continue;
}
for (Packet<?> packet : packets) {
Expand Down
Expand Up @@ -2130,10 +2130,7 @@ public static void sendPacketsNearby(Player from, Location location, Collection<
radius *= radius;
final org.bukkit.World world = location.getWorld();
for (Player player : CitizensAPI.getLocationLookup().getNearbyPlayers(location, radius)) {
if (world != player.getWorld() || (from != null && !player.canSee(from))) {
continue;
}
if (location.distanceSquared(player.getLocation(PACKET_CACHE_LOCATION)) > radius) {
if (world != player.getWorld() || (from != null && !player.canSee(from)) || (location.distanceSquared(player.getLocation(PACKET_CACHE_LOCATION)) > radius)) {
continue;
}
for (Packet<?> packet : packets) {
Expand Down
Expand Up @@ -2102,10 +2102,7 @@ public static void sendPacketsNearby(Player from, Location location, Collection<
radius *= radius;
final org.bukkit.World world = location.getWorld();
for (Player player : CitizensAPI.getLocationLookup().getNearbyPlayers(location, radius)) {
if (world != player.getWorld() || (from != null && !player.canSee(from))) {
continue;
}
if (location.distanceSquared(player.getLocation(PACKET_CACHE_LOCATION)) > radius) {
if (world != player.getWorld() || (from != null && !player.canSee(from)) || (location.distanceSquared(player.getLocation(PACKET_CACHE_LOCATION)) > radius)) {
continue;
}
for (Packet<?> packet : packets) {
Expand Down
Expand Up @@ -2096,10 +2096,7 @@ public static void sendPacketsNearby(Player from, Location location, Collection<
radius *= radius;
final org.bukkit.World world = location.getWorld();
for (Player player : CitizensAPI.getLocationLookup().getNearbyPlayers(location, radius)) {
if (world != player.getWorld() || (from != null && !player.canSee(from))) {
continue;
}
if (location.distanceSquared(player.getLocation(PACKET_CACHE_LOCATION)) > radius) {
if (world != player.getWorld() || (from != null && !player.canSee(from)) || (location.distanceSquared(player.getLocation(PACKET_CACHE_LOCATION)) > radius)) {
continue;
}
for (Packet<?> packet : packets) {
Expand Down
Expand Up @@ -2103,10 +2103,7 @@ public static void sendPacketsNearby(Player from, Location location, Collection<
radius *= radius;
final org.bukkit.World world = location.getWorld();
for (Player player : CitizensAPI.getLocationLookup().getNearbyPlayers(location, radius)) {
if (world != player.getWorld() || (from != null && !player.canSee(from))) {
continue;
}
if (location.distanceSquared(player.getLocation(PACKET_CACHE_LOCATION)) > radius) {
if (world != player.getWorld() || (from != null && !player.canSee(from)) || (location.distanceSquared(player.getLocation(PACKET_CACHE_LOCATION)) > radius)) {
continue;
}
for (Packet<?> packet : packets) {
Expand Down
Expand Up @@ -148,7 +148,7 @@ private boolean canWalkAbove(int var0, int var1, int var2, int var3, int var4, i
}
return true;
}
private boolean canWalkOn(int var0, int var1, int var2, int var3, int var4, int var5, Vec3 var6, double var7,
double var9) {
int var11 = var0 - var3 / 2;
Expand Down
Expand Up @@ -2153,10 +2153,7 @@ public static void sendPacketsNearby(Player from, Location location, Collection<
radius *= radius;
final org.bukkit.World world = location.getWorld();
for (Player player : CitizensAPI.getLocationLookup().getNearbyPlayers(location, radius)) {
if (world != player.getWorld() || (from != null && !player.canSee(from))) {
continue;
}
if (location.distanceSquared(player.getLocation(PACKET_CACHE_LOCATION)) > radius) {
if (world != player.getWorld() || (from != null && !player.canSee(from)) || (location.distanceSquared(player.getLocation(PACKET_CACHE_LOCATION)) > radius)) {
continue;
}
for (Packet<?> packet : packets) {
Expand Down
Expand Up @@ -148,7 +148,7 @@ private boolean canWalkAbove(int var0, int var1, int var2, int var3, int var4, i
}
return true;
}
private boolean canWalkOn(int var0, int var1, int var2, int var3, int var4, int var5, Vec3 var6, double var7,
double var9) {
int var11 = var0 - var3 / 2;
Expand Down
Expand Up @@ -1626,10 +1626,7 @@ public static void sendPacketsNearby(Player from, Location location, Collection<
radius *= radius;
final org.bukkit.World world = location.getWorld();
for (Player player : CitizensAPI.getLocationLookup().getNearbyPlayers(location, radius)) {
if (world != player.getWorld() || (from != null && !player.canSee(from))) {
continue;
}
if (location.distanceSquared(player.getLocation(PACKET_CACHE_LOCATION)) > radius) {
if (world != player.getWorld() || (from != null && !player.canSee(from)) || (location.distanceSquared(player.getLocation(PACKET_CACHE_LOCATION)) > radius)) {
continue;
}
for (Packet<?> packet : packets) {
Expand Down

0 comments on commit 46b18ee

Please sign in to comment.