From ad9b0aeab0c854607ee2ed15d7af73f8264f2d53 Mon Sep 17 00:00:00 2001 From: Lixfel Date: Fri, 19 Jan 2024 15:52:06 +0100 Subject: [PATCH] Fix freeze order. --- .../steamwar/bausystem/features/world/AFKStopperListener.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/BauSystem_Main/src/de/steamwar/bausystem/features/world/AFKStopperListener.java b/BauSystem_Main/src/de/steamwar/bausystem/features/world/AFKStopperListener.java index 70434d25..263324c3 100644 --- a/BauSystem_Main/src/de/steamwar/bausystem/features/world/AFKStopperListener.java +++ b/BauSystem_Main/src/de/steamwar/bausystem/features/world/AFKStopperListener.java @@ -26,6 +26,7 @@ import org.bukkit.Bukkit; import org.bukkit.Location; import org.bukkit.entity.Player; import org.bukkit.event.EventHandler; +import org.bukkit.event.EventPriority; import org.bukkit.event.Listener; import org.bukkit.event.player.PlayerJoinEvent; import org.bukkit.event.player.PlayerMoveEvent; @@ -67,7 +68,7 @@ public class AFKStopperListener implements Listener { event.getPlayer().setOp(true); } - @EventHandler + @EventHandler(priority = EventPriority.MONITOR) public void onPlayerQuit(PlayerQuitEvent event) { if(Bukkit.getOnlinePlayers().isEmpty() || (Bukkit.getOnlinePlayers().size() == 1 && Bukkit.getOnlinePlayers().contains(event.getPlayer()))) CheckpointUtils.freeze();