check global player list where appropriate
Makes certain entities check all players when searching for a player instead of just checking players in their world.
This commit is contained in:
@@ -62,3 +62,15 @@
|
||||
default boolean hasNearbyAlivePlayer(double x, double y, double z, double range) {
|
||||
for (Player player : this.players()) {
|
||||
if (EntitySelector.NO_SPECTATORS.test(player) && EntitySelector.LIVING_ENTITY_STILL_ALIVE.test(player)) {
|
||||
@@ -124,4 +165,11 @@
|
||||
|
||||
return null;
|
||||
}
|
||||
+
|
||||
+ // Paper start - check global player list where appropriate
|
||||
+ @Nullable
|
||||
+ default Player getGlobalPlayerByUUID(UUID uuid) {
|
||||
+ return this.getPlayerByUUID(uuid);
|
||||
+ }
|
||||
+ // Paper end - check global player list where appropriate
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user