From 4e4038cce8d9d960b1b9365ef54984bc38940569 Mon Sep 17 00:00:00 2001 From: Gegy Date: Sun, 9 Jun 2024 14:47:22 +0200 Subject: [PATCH] Fix: don't remove player from team twice if clearing after TeamManager has made them offline --- .../java/xyz/nucleoid/plasmid/game/common/team/TeamManager.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/xyz/nucleoid/plasmid/game/common/team/TeamManager.java b/src/main/java/xyz/nucleoid/plasmid/game/common/team/TeamManager.java index dbd97830..45820469 100644 --- a/src/main/java/xyz/nucleoid/plasmid/game/common/team/TeamManager.java +++ b/src/main/java/xyz/nucleoid/plasmid/game/common/team/TeamManager.java @@ -189,7 +189,7 @@ public boolean removePlayerFrom(PlayerRef player, GameTeamKey team) { throw new IllegalStateException("Player " + player + " was not in team " + team + ", but had a mapping"); } - var entity = this.gameSpace.getPlayers().getEntity(player.id()); + var entity = state.onlinePlayers.getEntity(player.id()); if (entity != null) { this.removeOnlinePlayer(entity, state); }