SteamWar/FightSystem
Archiviert
13
1

Not stable version

Signed-off-by: Yaruma3341 <yaruma3341@gmail.com>
Dieser Commit ist enthalten in:
Yaruma3341 2019-02-23 20:35:30 +01:00
Ursprung c06a6803cc
Commit c81a454f43
2 geänderte Dateien mit 8 neuen und 5 gelöschten Zeilen

Datei anzeigen

@ -22,6 +22,9 @@ public class EntityDamageByEntityListener implements Listener {
if(event.getEntity() instanceof Player) {
event.setCancelled(true);
}
if(event.getDamager() instanceof TNTPrimed) {
event.setCancelled(true);
}
} else {
if(event.getEntity() instanceof Player) {
Player player = ((Player) event.getEntity()).getPlayer();

Datei anzeigen

@ -33,14 +33,11 @@ public class PlayerJoinListener implements Listener {
if(!Fight.getRedTeam().hasTeamLeader()) {
Fight.getRedTeam().setLeader(new FightPlayer(player, false));
player.setGameMode(GameMode.ADVENTURE);
Bukkit.broadcastMessage("ADVENTURE 36");
} else if(!Fight.getBlueTeam().hasTeamLeader()) {
Fight.getBlueTeam().setLeader(new FightPlayer(player, false));
player.setGameMode(GameMode.ADVENTURE);
Bukkit.broadcastMessage("ADVENTURE 39");
} else {
player.setGameMode(GameMode.SPECTATOR);
Bukkit.broadcastMessage("SPECTATOR 42");
player.teleport(instance.getSpecSpawnLoc());
}
}
@ -58,8 +55,11 @@ public class PlayerJoinListener implements Listener {
player.setGameMode(GameMode.ADVENTURE);
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
Bukkit.broadcastMessage(FightSystem.PREFIX + "§aDer Spieler §6" + fightPlayer.getPlayer().getName() + " §aist dem Kampf beigetreten!");
} else {
player.setGameMode(GameMode.SPECTATOR);
if(fightTeam == Fight.redTeam)