From 57ad7aaa8d12d1433b2c257fb470f67bbee7a781 Mon Sep 17 00:00:00 2001 From: Jascha Starke Date: Sat, 14 Sep 2013 14:30:09 +0200 Subject: [PATCH] Fixed #146 by reverting event priority f*ckup --- .../minecraft/limitedcreative/inventories/PlayerListener.java | 2 +- .../minecraft/limitedcreative/regions/PlayerListener.java | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/main/java/de/jaschastarke/minecraft/limitedcreative/inventories/PlayerListener.java b/src/main/java/de/jaschastarke/minecraft/limitedcreative/inventories/PlayerListener.java index bd92784..bc0624d 100644 --- a/src/main/java/de/jaschastarke/minecraft/limitedcreative/inventories/PlayerListener.java +++ b/src/main/java/de/jaschastarke/minecraft/limitedcreative/inventories/PlayerListener.java @@ -33,7 +33,7 @@ public class PlayerListener implements Listener { this.mod = mod; } - @EventHandler(priority=EventPriority.LOW, ignoreCancelled = true) + @EventHandler(priority=EventPriority.HIGH, ignoreCancelled = true) public void onPlayerGameModeChange(PlayerGameModeChangeEvent event) { boolean isLoggedIn = Hooks.IsLoggedIn.test(event.getPlayer()); if (mod.isDebug()) { diff --git a/src/main/java/de/jaschastarke/minecraft/limitedcreative/regions/PlayerListener.java b/src/main/java/de/jaschastarke/minecraft/limitedcreative/regions/PlayerListener.java index 6cc5a59..b0ce16e 100644 --- a/src/main/java/de/jaschastarke/minecraft/limitedcreative/regions/PlayerListener.java +++ b/src/main/java/de/jaschastarke/minecraft/limitedcreative/regions/PlayerListener.java @@ -8,6 +8,7 @@ import org.bukkit.block.Block; import org.bukkit.block.Sign; import org.bukkit.entity.Player; import org.bukkit.event.EventHandler; +import org.bukkit.event.EventPriority; import org.bukkit.event.block.Action; import org.bukkit.event.player.PlayerGameModeChangeEvent; import org.bukkit.event.player.PlayerInteractEntityEvent; @@ -24,7 +25,7 @@ public class PlayerListener extends Listener { super(mod); } - @EventHandler(ignoreCancelled = true) + @EventHandler(priority = EventPriority.LOW, ignoreCancelled = true) public void onPlayerInteract(PlayerInteractEvent event) { if (event.getAction() != Action.RIGHT_CLICK_BLOCK) return;