Signed-off-by: Lixfel <agga-games@gmx.de>
Dieser Commit ist enthalten in:
Ursprung
39bff371a4
Commit
e0b6c1b931
@ -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;
|
||||||
|
|
||||||
|
@ -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<>());
|
||||||
|
In neuem Issue referenzieren
Einen Benutzer sperren