From dba3872a25fa73eafd0d407a5eb87442b922e25c Mon Sep 17 00:00:00 2001 From: Lixfel Date: Mon, 10 Feb 2020 14:31:37 +0100 Subject: [PATCH] Autostarting fight with end of setup countdown (like in events) Signed-off-by: Lixfel --- .../de/steamwar/fightsystem/FightSystem.java | 4 +--- .../countdown/EventStartCountdown.java | 21 ------------------- .../countdown/SetupOverCountdown.java | 10 ++++----- 3 files changed, 5 insertions(+), 30 deletions(-) delete mode 100644 FightSystem_Main/src/de/steamwar/fightsystem/countdown/EventStartCountdown.java diff --git a/FightSystem_Main/src/de/steamwar/fightsystem/FightSystem.java b/FightSystem_Main/src/de/steamwar/fightsystem/FightSystem.java index e52ca64..43dd264 100644 --- a/FightSystem_Main/src/de/steamwar/fightsystem/FightSystem.java +++ b/FightSystem_Main/src/de/steamwar/fightsystem/FightSystem.java @@ -123,9 +123,7 @@ public class FightSystem extends JavaPlugin { Fight.getRedTeam().pasteSchematic(); } - if(Config.event()) - mainCountdown = new EventStartCountdown(); - else if(Config.test()) + if(Config.test()) mainCountdown = null; else mainCountdown = new SetupOverCountdown(); diff --git a/FightSystem_Main/src/de/steamwar/fightsystem/countdown/EventStartCountdown.java b/FightSystem_Main/src/de/steamwar/fightsystem/countdown/EventStartCountdown.java deleted file mode 100644 index ffea0db..0000000 --- a/FightSystem_Main/src/de/steamwar/fightsystem/countdown/EventStartCountdown.java +++ /dev/null @@ -1,21 +0,0 @@ -package de.steamwar.fightsystem.countdown; - -import de.steamwar.fightsystem.FightSystem; -import de.steamwar.fightsystem.Config; - -public class EventStartCountdown extends Countdown { - - public EventStartCountdown() { - super(Config.SetupDuration, SWSound.BLOCK_NOTE_PLING, false); - } - - @Override - String countdownCounting() { - return "bis die Kits verteilt werden!"; - } - - @Override - void countdownFinished() { - FightSystem.setPreRunningState(); - } -} diff --git a/FightSystem_Main/src/de/steamwar/fightsystem/countdown/SetupOverCountdown.java b/FightSystem_Main/src/de/steamwar/fightsystem/countdown/SetupOverCountdown.java index 01fcdbb..13f1536 100644 --- a/FightSystem_Main/src/de/steamwar/fightsystem/countdown/SetupOverCountdown.java +++ b/FightSystem_Main/src/de/steamwar/fightsystem/countdown/SetupOverCountdown.java @@ -1,8 +1,7 @@ package de.steamwar.fightsystem.countdown; -import de.steamwar.fightsystem.FightSystem; import de.steamwar.fightsystem.Config; -import org.bukkit.Bukkit; +import de.steamwar.fightsystem.FightSystem; public class SetupOverCountdown extends Countdown { @@ -11,13 +10,12 @@ public class SetupOverCountdown extends Countdown { } @Override - public String countdownCounting() { - return "bis die Teams bereit sein müssen!"; + String countdownCounting() { + return "bis die Kits verteilt werden!"; } @Override public void countdownFinished() { - Bukkit.broadcastMessage(FightSystem.PREFIX + "§cKampf wird abgebrochen!"); - Bukkit.getServer().shutdown(); + FightSystem.setPreRunningState(); } }