diff --git a/src/main/java/com/alttd/ctf/flag/Flag.java b/src/main/java/com/alttd/ctf/flag/Flag.java index b7e1783..ab40d09 100644 --- a/src/main/java/com/alttd/ctf/flag/Flag.java +++ b/src/main/java/com/alttd/ctf/flag/Flag.java @@ -81,8 +81,8 @@ public class Flag implements Runnable { //TODO add de-buffs and enable buffs for others? player.getInventory().setItem(EquipmentSlot.HEAD, flagItem); Bukkit.getScheduler().runTask(main, () -> flagLocation.getBlock().setType(Material.AIR)); - notifyAboutCapture(); flagCarrier = player; + notifyAboutCapture(); resetFlag(); } diff --git a/src/main/java/com/alttd/ctf/game/RunningGame.java b/src/main/java/com/alttd/ctf/game/RunningGame.java index 23028d3..8279c94 100644 --- a/src/main/java/com/alttd/ctf/game/RunningGame.java +++ b/src/main/java/com/alttd/ctf/game/RunningGame.java @@ -39,7 +39,6 @@ public class RunningGame implements Runnable { try { GamePhase nextPhase = (currentPhase.ordinal() + 1 < GamePhase.values().length) ? GamePhase.values()[currentPhase.ordinal() + 1] : null; if (phaseStartTime == null) { - phaseStartTime = Instant.now(); nextPhaseActions(null, currentPhase); } @@ -60,6 +59,7 @@ public class RunningGame implements Runnable { private void nextPhaseActions(@Nullable GamePhase previousPhase, @NotNull GamePhase phase) { //TODO command to go to next phase this.currentPhase = phase; + this.phaseStartTime = Instant.now(); if (previousPhase != null) { gameManager.getPhaseExecutor(previousPhase).end(phase); } diff --git a/version.properties b/version.properties index 7a221ff..e0fff57 100644 --- a/version.properties +++ b/version.properties @@ -1,3 +1,3 @@ -#Tue Feb 11 22:04:16 CET 2025 -buildNumber=42 +#Tue Feb 11 22:21:13 CET 2025 +buildNumber=45 version=0.1