Not stable version
Signed-off-by: Yaruma3341 <yaruma3341@gmail.com>
Dieser Commit ist enthalten in:
Ursprung
a6019bdbdb
Commit
6264f21fca
@ -56,15 +56,15 @@ public class FightTeam {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public boolean isPlayerInTeam(Player player) {
|
public boolean isPlayerInTeam(Player player) {
|
||||||
|
for(FightPlayer fightPlayer : this.players) {
|
||||||
|
if(!fightPlayer.getPlayer().equals(player)) continue;
|
||||||
|
return true;
|
||||||
|
}
|
||||||
if(this.leader.getPlayer() == null) return false;
|
if(this.leader.getPlayer() == null) return false;
|
||||||
|
|
||||||
if(this.leader.getPlayer().equals(player)) {
|
if(this.leader.getPlayer().equals(player)) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
for(FightPlayer fightPlayer : this.players) {
|
|
||||||
if(!fightPlayer.getPlayer().equals(player)) continue;
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -33,11 +33,14 @@ public class PlayerJoinListener implements Listener {
|
|||||||
if(!Fight.getRedTeam().hasTeamLeader()) {
|
if(!Fight.getRedTeam().hasTeamLeader()) {
|
||||||
Fight.getRedTeam().setLeader(new FightPlayer(player, false));
|
Fight.getRedTeam().setLeader(new FightPlayer(player, false));
|
||||||
player.setGameMode(GameMode.ADVENTURE);
|
player.setGameMode(GameMode.ADVENTURE);
|
||||||
|
Bukkit.broadcastMessage("ADVENTURE 36");
|
||||||
} else if(!Fight.getBlueTeam().hasTeamLeader()) {
|
} else if(!Fight.getBlueTeam().hasTeamLeader()) {
|
||||||
Fight.getBlueTeam().setLeader(new FightPlayer(player, false));
|
Fight.getBlueTeam().setLeader(new FightPlayer(player, false));
|
||||||
player.setGameMode(GameMode.ADVENTURE);
|
player.setGameMode(GameMode.ADVENTURE);
|
||||||
|
Bukkit.broadcastMessage("ADVENTURE 39");
|
||||||
} else {
|
} else {
|
||||||
player.setGameMode(GameMode.SPECTATOR);
|
player.setGameMode(GameMode.SPECTATOR);
|
||||||
|
Bukkit.broadcastMessage("SPECTATOR 42");
|
||||||
player.teleport(instance.getSpecSpawnLoc());
|
player.teleport(instance.getSpecSpawnLoc());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
In neuem Issue referenzieren
Einen Benutzer sperren