Don't throw when removing unplaced player in NearbyPlayers

This commit is contained in:
Nassim Jahnke 2023-09-30 15:37:00 +10:00
parent 933793244c
commit 696a5041a0

View File

@ -5534,7 +5534,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
+ public void removePlayer(final ServerPlayer player) {
+ final TrackedPlayer[] players = this.players.remove(player);
+ if (players == null) {
+ throw new IllegalStateException("Don't have player " + player);
+ return; // May be called during teleportation before the player is actually placed
+ }
+
+ for (final TrackedPlayer tracker : players) {