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() {
|
public Player getPlayer() {
|
||||||
Player bukkit = Bukkit.getPlayer(uuid);
|
Player bukkit = Bukkit.getPlayer(uuid);
|
||||||
if(bukkit != player)
|
if(bukkit != null)
|
||||||
player = bukkit;
|
player = bukkit;
|
||||||
return player;
|
return player;
|
||||||
}
|
}
|
||||||
|
@ -203,7 +203,7 @@ public class FightTeam {
|
|||||||
Set<UUID> playerSet = new HashSet<>(players.keySet());
|
Set<UUID> playerSet = new HashSet<>(players.keySet());
|
||||||
for(UUID uuid : playerSet){
|
for(UUID uuid : playerSet){
|
||||||
Player player = Bukkit.getPlayer(uuid);
|
Player player = Bukkit.getPlayer(uuid);
|
||||||
if(player != null)
|
if(player == null)
|
||||||
removePlayer(player);
|
removePlayer(player);
|
||||||
}
|
}
|
||||||
FightPlayer leaderBackup = leader;
|
FightPlayer leaderBackup = leader;
|
||||||
|
@ -95,11 +95,16 @@ public class Permanent implements Listener {
|
|||||||
event.setJoinMessage(null);
|
event.setJoinMessage(null);
|
||||||
|
|
||||||
Player player = event.getPlayer();
|
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);
|
Fight.setPlayerGamemode(player, GameMode.SPECTATOR);
|
||||||
spectatorTeam.addEntry(player.getName());
|
spectatorTeam.addEntry(player.getName());
|
||||||
player.teleport(Config.SpecSpawn);
|
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