From aa2290dac8c7eb4986cc71776130f7e224928cd1 Mon Sep 17 00:00:00 2001 From: Chaoscaot Date: Sat, 19 Aug 2023 11:21:01 +0200 Subject: [PATCH 1/3] Fix Game Tie Race Condition --- .../towerrun/winconditions/LastOutsideWincondition.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/de/steamwar/towerrun/winconditions/LastOutsideWincondition.java b/src/de/steamwar/towerrun/winconditions/LastOutsideWincondition.java index 580f5b4..7784452 100644 --- a/src/de/steamwar/towerrun/winconditions/LastOutsideWincondition.java +++ b/src/de/steamwar/towerrun/winconditions/LastOutsideWincondition.java @@ -23,6 +23,7 @@ import de.steamwar.towerrun.game.TowerRunGame; import de.steamwar.towerrun.game.TowerRunPlayer; import org.bukkit.entity.Player; import org.bukkit.event.EventHandler; +import org.bukkit.event.EventPriority; import org.bukkit.event.entity.PlayerDeathEvent; public class LastOutsideWincondition extends OutsideWincondition{ @@ -39,7 +40,7 @@ public class LastOutsideWincondition extends OutsideWincondition{ } } - @EventHandler + @EventHandler(priority = EventPriority.LOW) public void onPlayerDeath(PlayerDeathEvent event) { if(TowerRunGame.PLAYERS_ALIVE.isEmpty()) { if(TowerRunGame.PLAYERS_ESCAPED.isEmpty()) { From 2f9c035925796da74aaec4affa2f635a184cff0f Mon Sep 17 00:00:00 2001 From: Chaoscaot Date: Sat, 19 Aug 2023 11:28:49 +0200 Subject: [PATCH 2/3] Fix Game Start --- src/de/steamwar/towerrun/countdowns/LobbyCountdown.java | 1 + 1 file changed, 1 insertion(+) diff --git a/src/de/steamwar/towerrun/countdowns/LobbyCountdown.java b/src/de/steamwar/towerrun/countdowns/LobbyCountdown.java index 43093b7..bd46404 100644 --- a/src/de/steamwar/towerrun/countdowns/LobbyCountdown.java +++ b/src/de/steamwar/towerrun/countdowns/LobbyCountdown.java @@ -48,6 +48,7 @@ public class LobbyCountdown extends Countdown { @Override void timerEnd() { TowerRunGame.start(); + override = false; } @Override From 98147fe721a0be5e470a703b0f765121a93fbe89 Mon Sep 17 00:00:00 2001 From: Chaoscaot Date: Sat, 19 Aug 2023 11:53:21 +0200 Subject: [PATCH 3/3] Fix ApiVersion --- src/de/steamwar/towerrun/TowerRun.java | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/src/de/steamwar/towerrun/TowerRun.java b/src/de/steamwar/towerrun/TowerRun.java index 28545d2..3db0449 100644 --- a/src/de/steamwar/towerrun/TowerRun.java +++ b/src/de/steamwar/towerrun/TowerRun.java @@ -30,15 +30,17 @@ import de.steamwar.towerrun.listener.NotLobbyListener; import lombok.Getter; import org.bukkit.plugin.java.JavaPlugin; import org.bukkit.plugin.java.annotation.dependency.Dependency; +import org.bukkit.plugin.java.annotation.plugin.ApiVersion; import org.bukkit.plugin.java.annotation.plugin.Description; import org.bukkit.plugin.java.annotation.plugin.Plugin; import org.bukkit.plugin.java.annotation.plugin.author.Author; @Plugin(name = "TowerRun", version = "1.0.0") -@Dependency(value = "SpigotCore") -@Author(value = "YoyoNow") -@Author(value = "Chaoscaot") -@Description(value = "SteamWar TowerRun Plugin") +@Dependency("SpigotCore") +@Author("YoyoNow") +@Author("Chaoscaot") +@Description("SteamWar TowerRun Plugin") +@ApiVersion(ApiVersion.Target.v1_19) public class TowerRun extends JavaPlugin { @Getter