Signed-off-by: Lixfel <agga-games@gmx.de>
Dieser Commit ist enthalten in:
Ursprung
6081c5f565
Commit
43e63b4201
@ -76,7 +76,7 @@ public class FightPlayer {
|
||||
|
||||
public Player getPlayer() {
|
||||
Player bukkit = Bukkit.getPlayer(uuid);
|
||||
if(bukkit != player)
|
||||
if(bukkit != null)
|
||||
player = bukkit;
|
||||
return player;
|
||||
}
|
||||
|
@ -203,7 +203,7 @@ public class FightTeam {
|
||||
Set<UUID> playerSet = new HashSet<>(players.keySet());
|
||||
for(UUID uuid : playerSet){
|
||||
Player player = Bukkit.getPlayer(uuid);
|
||||
if(player != null)
|
||||
if(player == null)
|
||||
removePlayer(player);
|
||||
}
|
||||
FightPlayer leaderBackup = leader;
|
||||
|
@ -95,11 +95,16 @@ public class Permanent implements Listener {
|
||||
event.setJoinMessage(null);
|
||||
|
||||
Player player = event.getPlayer();
|
||||
FightPlayer fp = Fight.getFightPlayer(player);
|
||||
|
||||
if (!Config.ArenaLeaveable && !Fight.fighting(player)) {
|
||||
if (!Config.ArenaLeaveable && fp == null) {
|
||||
Fight.setPlayerGamemode(player, GameMode.SPECTATOR);
|
||||
spectatorTeam.addEntry(player.getName());
|
||||
player.teleport(Config.SpecSpawn);
|
||||
} else if(fp != null && !fp.isLiving()) {
|
||||
Fight.setPlayerGamemode(player, GameMode.SPECTATOR);
|
||||
HotbarKit.spectatorKit.loadToPlayer(player);
|
||||
player.teleport(fp.getTeam().getSpawn());
|
||||
}
|
||||
}
|
||||
|
||||
|
In neuem Issue referenzieren
Einen Benutzer sperren