Fix for events

This commit is contained in:
2025-05-14 19:28:27 +02:00
parent e893d7934a
commit 260656ad35
3 changed files with 9 additions and 3 deletions
@@ -20,6 +20,7 @@
package de.steamwar.towerrun.countdowns;
import de.steamwar.towerrun.TowerRun;
import de.steamwar.towerrun.config.Config;
import de.steamwar.towerrun.game.TowerRunGame;
import de.steamwar.towerrun.state.GameStates;
import org.bukkit.Bukkit;
@@ -48,7 +49,11 @@ public class EndCountdown extends Countdown {
void timerEnd() {
Bukkit.getOnlinePlayers().forEach(player -> player.playSound(player.getLocation(), Sound.BLOCK_NOTE_BLOCK_PLING, 1, 1));
if (RESETS) {
TowerRunGame.reset();
if (Config.event()) {
Bukkit.shutdown();
} else {
TowerRunGame.reset();
}
lobbyCountdown.setTime(lobbyCountdown.defaultTime());
} else {
Bukkit.shutdown();