SteamWar/FightSystem
Archiviert
13
1
Signed-off-by: Yaruma3341 <yaruma3341@gmail.com>
Dieser Commit ist enthalten in:
Yaruma3341 2019-04-14 14:12:21 +02:00
Ursprung 700d01bdac
Commit 231d3fcb1c
2 geänderte Dateien mit 8 neuen und 4 gelöschten Zeilen

Datei anzeigen

@ -35,7 +35,7 @@ public class WaterRemover {
}, 0L, 20L);
}
private void stop() {
public void stop() {
if (this.task != null) {
this.task.cancel();
}

Datei anzeigen

@ -64,10 +64,12 @@ public class WinconditionTechKO {
Bukkit.getScheduler().cancelTask(taskID);
Bukkit.broadcastMessage(FightSystem.PREFIX + "§6Das Team " + Config.TeamRedPrefix + Config.TeamRedName + " §6ist Tech K.O. !");
FightSystem.getPlugin().setSpectateState(Fight.getBlueTeam());
FightSystem.getPlugin().getWaterRemover().stop();
} else if(teamBlueWater.isEmpty()) {
Bukkit.getScheduler().cancelTask(taskID);
Bukkit.broadcastMessage(FightSystem.PREFIX + "§6Das Team " + Config.TeamBluePrefix + Config.TeamBlueName + " §6ist Tech K.O. !");
FightSystem.getPlugin().setSpectateState(Fight.getRedTeam());
FightSystem.getPlugin().getWaterRemover().stop();
}
Bukkit.broadcastMessage("RedList: " + teamRedWater.size());
Bukkit.broadcastMessage("BlueList: " + teamBlueWater.size());
@ -88,14 +90,15 @@ public class WinconditionTechKO {
Bukkit.getScheduler().cancelTask(taskID);
Bukkit.broadcastMessage(FightSystem.PREFIX + "§6Das Team " + Config.TeamRedPrefix + Config.TeamRedName + " §6ist Tech K.O. !");
FightSystem.getPlugin().setSpectateState(Fight.getBlueTeam());
FightSystem.getPlugin().getWaterRemover().stop();
}
//Team Blue
Iterator itrBlue = teamBlueWater.iterator();
while (itrRed.hasNext()) {
Location location = (Location) itrRed.next();
while (itrBlue.hasNext()) {
Location location = (Location) itrBlue.next();
if(location.getBlock().getType() != Material.WATER && location.getBlock().getType() != Material.STATIONARY_WATER) {
itrRed.remove();
itrBlue.remove();
Bukkit.broadcastMessage("blue remove" + teamBlueWater.size());
}
}
@ -103,6 +106,7 @@ public class WinconditionTechKO {
Bukkit.getScheduler().cancelTask(taskID);
Bukkit.broadcastMessage(FightSystem.PREFIX + "§6Das Team " + Config.TeamBluePrefix + Config.TeamBlueName + " §6ist Tech K.O. !");
FightSystem.getPlugin().setSpectateState(Fight.getRedTeam());
FightSystem.getPlugin().getWaterRemover().stop();
}
}