Not stable version
Signed-off-by: Yaruma3341 <yaruma3341@gmail.com>
Dieser Commit ist enthalten in:
Ursprung
8b30e77bc5
Commit
1cb8b79f61
@ -43,25 +43,16 @@ public class PlayerJoinListener implements Listener {
|
|||||||
}
|
}
|
||||||
|
|
||||||
FightTeam fightTeam = Fight.getPlayerTeam(player);
|
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(Fight.getPlayerTeam(player) != null) {
|
||||||
if (instance.getFightState() == FightState.SETUP) {
|
FightPlayer fightPlayer = fightTeam.getFightPlayer(player);
|
||||||
player.teleport(instance.getFightManager().getRedTeleportLocation());
|
|
||||||
|
if(instance.getFightState() == FightState.SETUP) {
|
||||||
|
if(fightTeam == Fight.redTeam) {
|
||||||
|
player.teleport(instance.getFightManager().getRedTeleportLocation());
|
||||||
|
} else
|
||||||
|
player.teleport(instance.getFightManager().getBlueTeleportLocation());
|
||||||
|
|
||||||
player.setGameMode(GameMode.SURVIVAL);
|
player.setGameMode(GameMode.SURVIVAL);
|
||||||
if(fightPlayer.isLeader()) SetupItems.giveSetupItems(player);
|
if(fightPlayer.isLeader()) SetupItems.giveSetupItems(player);
|
||||||
if(fightPlayer.isOut()) {
|
if(fightPlayer.isOut()) {
|
||||||
@ -70,8 +61,12 @@ public class PlayerJoinListener implements Listener {
|
|||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
player.setGameMode(GameMode.SPECTATOR);
|
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) {
|
if(Fight.getRedTeam().getLeader().getPlayer() != null && Fight.getBlueTeam().getLeader().getPlayer() != null) {
|
||||||
|
In neuem Issue referenzieren
Einen Benutzer sperren