feat/data-edit-commands
William 2 years ago
parent d5569ad3ed
commit bb3753b8e4

@ -27,7 +27,7 @@ public interface BukkitDeathEventListener extends Listener {
@EventHandler(priority = EventPriority.LOWEST, ignoreCancelled = true) @EventHandler(priority = EventPriority.LOWEST, ignoreCancelled = true)
default void onPlayerDeathLowest(@NotNull PlayerDeathEvent event) { 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); handlePlayerDeath(event);
} }
} }

@ -37,6 +37,7 @@ public class BukkitEventListener extends EventListener implements BukkitJoinEven
@Override @Override
public boolean handleEvent(@NotNull Settings.EventType type, @NotNull Settings.EventPriority priority) { 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); return plugin.getSettings().getEventPriority(type).equals(priority);
} }

@ -28,7 +28,7 @@ public interface BukkitJoinEventListener extends Listener {
@EventHandler(priority = EventPriority.LOWEST, ignoreCancelled = true) @EventHandler(priority = EventPriority.LOWEST, ignoreCancelled = true)
default void onPlayerJoinLowest(@NotNull PlayerJoinEvent event) { 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())); handlePlayerJoin(BukkitPlayer.adapt(event.getPlayer()));
} }
} }

@ -28,7 +28,7 @@ public interface BukkitQuitEventListener extends Listener {
@EventHandler(priority = EventPriority.LOWEST, ignoreCancelled = true) @EventHandler(priority = EventPriority.LOWEST, ignoreCancelled = true)
default void onPlayerQuitLowest(@NotNull PlayerQuitEvent event) { 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())); handlePlayerQuit(BukkitPlayer.adapt(event.getPlayer()));
} }
} }

Loading…
Cancel
Save