SteamWar/FightSystem
Archiviert
13
1

Not stable version

Signed-off-by: Yaruma3341 <yaruma3341@gmail.com>
Dieser Commit ist enthalten in:
Yaruma3341 2019-02-23 12:14:33 +01:00
Ursprung 8b30e77bc5
Commit 1cb8b79f61

Datei anzeigen

@ -43,25 +43,16 @@ public class PlayerJoinListener implements Listener {
}
FightTeam fightTeam = Fight.getPlayerTeam(player);
FightPlayer fightPlayer = fightTeam.getFightPlayer(player);
if (fightTeam == Fight.blueTeam) {
if (instance.getFightState() == FightState.SETUP) {
player.teleport(instance.getFightManager().getBlueTeleportLocation());
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(FightSystem.getPlugin().getTeam2SpawnLoc());
}
}
if (fightTeam == Fight.redTeam) {
if (instance.getFightState() == FightState.SETUP) {
player.teleport(instance.getFightManager().getRedTeleportLocation());
if(Fight.getPlayerTeam(player) != null) {
FightPlayer fightPlayer = fightTeam.getFightPlayer(player);
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()) {
@ -70,8 +61,12 @@ public class PlayerJoinListener implements Listener {
}
} else {
player.setGameMode(GameMode.SPECTATOR);
player.teleport(instance.getTeam1SpawnLoc());
if(fightTeam == Fight.redTeam) {
player.teleport(FightSystem.getPlugin().getTeam1SpawnLoc());
} else
player.teleport(FightSystem.getPlugin().getTeam2SpawnLoc());
}
}
if(Fight.getRedTeam().getLeader().getPlayer() != null && Fight.getBlueTeam().getLeader().getPlayer() != null) {