From 37520991e52f37a5dca14c7579189481d3daa3d0 Mon Sep 17 00:00:00 2001 From: William Date: Sat, 22 Jan 2022 22:41:39 +0000 Subject: [PATCH] Conformity to Bukkit API conventions --- .../bukkit/listener/BukkitEventListener.java | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/bukkit/src/main/java/me/william278/husksync/bukkit/listener/BukkitEventListener.java b/bukkit/src/main/java/me/william278/husksync/bukkit/listener/BukkitEventListener.java index b34ca3f3..22debfc1 100644 --- a/bukkit/src/main/java/me/william278/husksync/bukkit/listener/BukkitEventListener.java +++ b/bukkit/src/main/java/me/william278/husksync/bukkit/listener/BukkitEventListener.java @@ -98,14 +98,14 @@ public class BukkitEventListener implements Listener { * Events to cancel if the player has not been set yet */ - @EventHandler(priority = EventPriority.MONITOR) + @EventHandler(priority = EventPriority.HIGHEST) public void onDropItem(PlayerDropItemEvent event) { if (!plugin.isEnabled() || !HuskSyncBukkit.handshakeCompleted || HuskSyncBukkit.bukkitCache.isAwaitingDataFetch(event.getPlayer().getUniqueId())) { event.setCancelled(true); // If the plugin / player has not been set } } - @EventHandler(priority = EventPriority.MONITOR) + @EventHandler(priority = EventPriority.HIGHEST) public void onPickupItem(EntityPickupItemEvent event) { if (event.getEntity() instanceof Player player) { if (!plugin.isEnabled() || !HuskSyncBukkit.handshakeCompleted || HuskSyncBukkit.bukkitCache.isAwaitingDataFetch(player.getUniqueId())) { @@ -114,28 +114,28 @@ public class BukkitEventListener implements Listener { } } - @EventHandler(priority = EventPriority.MONITOR) + @EventHandler(priority = EventPriority.HIGHEST) public void onPlayerInteract(PlayerInteractEvent event) { if (!plugin.isEnabled() || !HuskSyncBukkit.handshakeCompleted || HuskSyncBukkit.bukkitCache.isAwaitingDataFetch(event.getPlayer().getUniqueId())) { event.setCancelled(true); // If the plugin / player has not been set } } - @EventHandler(priority = EventPriority.MONITOR) + @EventHandler(priority = EventPriority.HIGHEST) public void onBlockPlace(BlockPlaceEvent event) { if (!plugin.isEnabled() || !HuskSyncBukkit.handshakeCompleted || HuskSyncBukkit.bukkitCache.isAwaitingDataFetch(event.getPlayer().getUniqueId())) { event.setCancelled(true); // If the plugin / player has not been set } } - @EventHandler(priority = EventPriority.MONITOR) + @EventHandler(priority = EventPriority.HIGHEST) public void onBlockBreak(BlockBreakEvent event) { if (!plugin.isEnabled() || !HuskSyncBukkit.handshakeCompleted || HuskSyncBukkit.bukkitCache.isAwaitingDataFetch(event.getPlayer().getUniqueId())) { event.setCancelled(true); // If the plugin / player has not been set } } - @EventHandler(priority = EventPriority.MONITOR) + @EventHandler(priority = EventPriority.HIGHEST) public void onInventoryOpen(InventoryOpenEvent event) { if (!plugin.isEnabled() || !HuskSyncBukkit.handshakeCompleted || HuskSyncBukkit.bukkitCache.isAwaitingDataFetch(event.getPlayer().getUniqueId())) { event.setCancelled(true); // If the plugin / player has not been set