SteamWar/BauSystem2.0
Archiviert
12
0

Fix freeze order. #222

Zusammengeführt
Lixfel hat 1 Commits von checkpoint nach master 2024-01-19 15:53:04 +01:00 zusammengeführt
Nur Änderungen aus Commit ad9b0aeab0 werden angezeigt - Alle Commits anzeigen

Datei anzeigen

@ -26,6 +26,7 @@ import org.bukkit.Bukkit;
import org.bukkit.Location; import org.bukkit.Location;
import org.bukkit.entity.Player; import org.bukkit.entity.Player;
import org.bukkit.event.EventHandler; import org.bukkit.event.EventHandler;
import org.bukkit.event.EventPriority;
import org.bukkit.event.Listener; import org.bukkit.event.Listener;
import org.bukkit.event.player.PlayerJoinEvent; import org.bukkit.event.player.PlayerJoinEvent;
import org.bukkit.event.player.PlayerMoveEvent; import org.bukkit.event.player.PlayerMoveEvent;
@ -67,7 +68,7 @@ public class AFKStopperListener implements Listener {
event.getPlayer().setOp(true); event.getPlayer().setOp(true);
} }
@EventHandler @EventHandler(priority = EventPriority.MONITOR)
public void onPlayerQuit(PlayerQuitEvent event) { public void onPlayerQuit(PlayerQuitEvent event) {
if(Bukkit.getOnlinePlayers().isEmpty() || (Bukkit.getOnlinePlayers().size() == 1 && Bukkit.getOnlinePlayers().contains(event.getPlayer()))) if(Bukkit.getOnlinePlayers().isEmpty() || (Bukkit.getOnlinePlayers().size() == 1 && Bukkit.getOnlinePlayers().contains(event.getPlayer())))
CheckpointUtils.freeze(); CheckpointUtils.freeze();