Not stable version
Signed-off-by: Yaruma3341 <yaruma3341@gmail.com>
Dieser Commit ist enthalten in:
Ursprung
8b30e77bc5
Commit
1cb8b79f61
@ -43,10 +43,16 @@ public class PlayerJoinListener implements Listener {
|
||||
}
|
||||
|
||||
FightTeam fightTeam = Fight.getPlayerTeam(player);
|
||||
|
||||
if(Fight.getPlayerTeam(player) != null) {
|
||||
FightPlayer fightPlayer = fightTeam.getFightPlayer(player);
|
||||
if (fightTeam == Fight.blueTeam) {
|
||||
if (instance.getFightState() == FightState.SETUP) {
|
||||
|
||||
if(instance.getFightState() == FightState.SETUP) {
|
||||
if(fightTeam == Fight.redTeam) {
|
||||
player.teleport(instance.getFightManager().getRedTeleportLocation());
|
||||
} else
|
||||
player.teleport(instance.getFightManager().getBlueTeleportLocation());
|
||||
|
||||
player.setGameMode(GameMode.SURVIVAL);
|
||||
if(fightPlayer.isLeader()) SetupItems.giveSetupItems(player);
|
||||
if(fightPlayer.isOut()) {
|
||||
@ -55,23 +61,12 @@ public class PlayerJoinListener implements Listener {
|
||||
}
|
||||
} else {
|
||||
player.setGameMode(GameMode.SPECTATOR);
|
||||
if(fightTeam == Fight.redTeam) {
|
||||
player.teleport(FightSystem.getPlugin().getTeam1SpawnLoc());
|
||||
} else
|
||||
player.teleport(FightSystem.getPlugin().getTeam2SpawnLoc());
|
||||
}
|
||||
}
|
||||
|
||||
if (fightTeam == Fight.redTeam) {
|
||||
if (instance.getFightState() == FightState.SETUP) {
|
||||
player.teleport(instance.getFightManager().getRedTeleportLocation());
|
||||
player.setGameMode(GameMode.SURVIVAL);
|
||||
if(fightPlayer.isLeader()) SetupItems.giveSetupItems(player);
|
||||
if(fightPlayer.isOut()) {
|
||||
fightPlayer.setOut(false);
|
||||
Bukkit.broadcastMessage(FightSystem.PREFIX + "§aDer Spieler §6" + fightPlayer.getPlayer().getName() + " §aist dem Kampf wieder beigetreten!");
|
||||
}
|
||||
} else {
|
||||
player.setGameMode(GameMode.SPECTATOR);
|
||||
player.teleport(instance.getTeam1SpawnLoc());
|
||||
}
|
||||
}
|
||||
|
||||
if(Fight.getRedTeam().getLeader().getPlayer() != null && Fight.getBlueTeam().getLeader().getPlayer() != null) {
|
||||
|
In neuem Issue referenzieren
Einen Benutzer sperren