SteamWar/FightSystem
Archiviert
13
1

Potential Border rejoin fix
Alle Prüfungen waren erfolgreich
SteamWarCI Build successful

Signed-off-by: Lixfel <agga-games@gmx.de>
Dieser Commit ist enthalten in:
Lixfel 2024-02-11 18:55:32 +01:00
Ursprung 39bff371a4
Commit e0b6c1b931
2 geänderte Dateien mit 8 neuen und 5 gelöschten Zeilen

Datei anzeigen

@ -201,13 +201,16 @@ public class FightTeam {
schematic.reset(); schematic.reset();
Set<UUID> playerSet = new HashSet<>(players.keySet()); Set<UUID> playerSet = new HashSet<>(players.keySet());
for(UUID uuid : playerSet){ playerSet.removeIf(uuid -> {
Player player = Bukkit.getPlayer(uuid); Player player = Bukkit.getPlayer(uuid);
if(player == null) if(player == null || !player.isOnline()) {
removePlayer(players.get(uuid).getEntity()); removePlayer(players.get(uuid).getEntity());
} return true;
}
return false;
});
FightPlayer leaderBackup = leader; FightPlayer leaderBackup = leader;
playerSet.removeIf(uuid -> Bukkit.getPlayer(uuid) == null);
players.clear(); players.clear();
leader = null; leader = null;

Datei anzeigen

@ -61,7 +61,7 @@ public class Border {
} }
public void addPlayer(Player player) { public void addPlayer(Player player) {
if(ghostBarriers.containsKey(player)) if(ghostBarriers.containsKey(player) || !player.isOnline())
return; return;
ghostBarriers.put(player, new HashSet<>()); ghostBarriers.put(player, new HashSet<>());