From bb3753b8e44d7ef67a35346c2177377763d08a9b Mon Sep 17 00:00:00 2001 From: William Date: Tue, 15 Nov 2022 00:42:34 +0000 Subject: [PATCH] Fix typo --- .../william278/husksync/listener/BukkitDeathEventListener.java | 2 +- .../net/william278/husksync/listener/BukkitEventListener.java | 1 + .../william278/husksync/listener/BukkitJoinEventListener.java | 2 +- .../william278/husksync/listener/BukkitQuitEventListener.java | 2 +- 4 files changed, 4 insertions(+), 3 deletions(-) diff --git a/bukkit/src/main/java/net/william278/husksync/listener/BukkitDeathEventListener.java b/bukkit/src/main/java/net/william278/husksync/listener/BukkitDeathEventListener.java index 20c21969..31699c91 100644 --- a/bukkit/src/main/java/net/william278/husksync/listener/BukkitDeathEventListener.java +++ b/bukkit/src/main/java/net/william278/husksync/listener/BukkitDeathEventListener.java @@ -27,7 +27,7 @@ public interface BukkitDeathEventListener extends Listener { @EventHandler(priority = EventPriority.LOWEST, ignoreCancelled = true) default void onPlayerDeathLowest(@NotNull PlayerDeathEvent event) { - if (handleEvent(Settings.EventType.DEATH_LISTENER, Settings.EventPriority.NORMAL)) { + if (handleEvent(Settings.EventType.DEATH_LISTENER, Settings.EventPriority.LOWEST)) { handlePlayerDeath(event); } } diff --git a/bukkit/src/main/java/net/william278/husksync/listener/BukkitEventListener.java b/bukkit/src/main/java/net/william278/husksync/listener/BukkitEventListener.java index 94654d35..efb1cf26 100644 --- a/bukkit/src/main/java/net/william278/husksync/listener/BukkitEventListener.java +++ b/bukkit/src/main/java/net/william278/husksync/listener/BukkitEventListener.java @@ -37,6 +37,7 @@ public class BukkitEventListener extends EventListener implements BukkitJoinEven @Override public boolean handleEvent(@NotNull Settings.EventType type, @NotNull Settings.EventPriority priority) { + plugin.getLoggingAdapter().debug("Handling event " + type.name() + " with priority " + priority.name()); return plugin.getSettings().getEventPriority(type).equals(priority); } diff --git a/bukkit/src/main/java/net/william278/husksync/listener/BukkitJoinEventListener.java b/bukkit/src/main/java/net/william278/husksync/listener/BukkitJoinEventListener.java index d9df8669..f0ccac92 100644 --- a/bukkit/src/main/java/net/william278/husksync/listener/BukkitJoinEventListener.java +++ b/bukkit/src/main/java/net/william278/husksync/listener/BukkitJoinEventListener.java @@ -28,7 +28,7 @@ public interface BukkitJoinEventListener extends Listener { @EventHandler(priority = EventPriority.LOWEST, ignoreCancelled = true) default void onPlayerJoinLowest(@NotNull PlayerJoinEvent event) { - if (handleEvent(Settings.EventType.JOIN_LISTENER, Settings.EventPriority.NORMAL)) { + if (handleEvent(Settings.EventType.JOIN_LISTENER, Settings.EventPriority.LOWEST)) { handlePlayerJoin(BukkitPlayer.adapt(event.getPlayer())); } } diff --git a/bukkit/src/main/java/net/william278/husksync/listener/BukkitQuitEventListener.java b/bukkit/src/main/java/net/william278/husksync/listener/BukkitQuitEventListener.java index 04f3ac65..c7223cde 100644 --- a/bukkit/src/main/java/net/william278/husksync/listener/BukkitQuitEventListener.java +++ b/bukkit/src/main/java/net/william278/husksync/listener/BukkitQuitEventListener.java @@ -28,7 +28,7 @@ public interface BukkitQuitEventListener extends Listener { @EventHandler(priority = EventPriority.LOWEST, ignoreCancelled = true) default void onPlayerQuitLowest(@NotNull PlayerQuitEvent event) { - if (handleEvent(Settings.EventType.QUIT_LISTENER, Settings.EventPriority.NORMAL)) { + if (handleEvent(Settings.EventType.QUIT_LISTENER, Settings.EventPriority.LOWEST)) { handlePlayerQuit(BukkitPlayer.adapt(event.getPlayer())); } }