diff options
author | KHobbits <rob@khobbits.co.uk> | 2012-09-19 21:07:50 +0100 |
---|---|---|
committer | KHobbits <rob@khobbits.co.uk> | 2012-09-19 21:07:50 +0100 |
commit | 44d8c854504546917091543b7ce3a9dbab239e53 (patch) | |
tree | 3cc2555358fd13ad22e66142906a4ca21f5c29f4 /EssentialsAntiBuild/src | |
parent | 2a8e44dda89d9c4b3ea7a79352473c000fb4633e (diff) | |
download | Essentials-44d8c854504546917091543b7ce3a9dbab239e53.tar Essentials-44d8c854504546917091543b7ce3a9dbab239e53.tar.gz Essentials-44d8c854504546917091543b7ce3a9dbab239e53.tar.lz Essentials-44d8c854504546917091543b7ce3a9dbab239e53.tar.xz Essentials-44d8c854504546917091543b7ce3a9dbab239e53.zip |
ignoreCancelled events.
Diffstat (limited to 'EssentialsAntiBuild/src')
-rw-r--r-- | EssentialsAntiBuild/src/com/earth2me/essentials/antibuild/EssentialsAntiBuildListener.java | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/EssentialsAntiBuild/src/com/earth2me/essentials/antibuild/EssentialsAntiBuildListener.java b/EssentialsAntiBuild/src/com/earth2me/essentials/antibuild/EssentialsAntiBuildListener.java index 1fc57525d..f061beed4 100644 --- a/EssentialsAntiBuild/src/com/earth2me/essentials/antibuild/EssentialsAntiBuildListener.java +++ b/EssentialsAntiBuild/src/com/earth2me/essentials/antibuild/EssentialsAntiBuildListener.java @@ -235,7 +235,7 @@ public class EssentialsAntiBuildListener implements Listener } } - @EventHandler(priority = EventPriority.LOW) + @EventHandler(priority = EventPriority.LOW, ignoreCancelled = true) public void onCraftItemEvent(final CraftItemEvent event) { HumanEntity entity = event.getWhoClicked(); @@ -256,14 +256,14 @@ public class EssentialsAntiBuildListener implements Listener } } - @EventHandler(priority = EventPriority.LOW) + @EventHandler(priority = EventPriority.LOW, ignoreCancelled = true) public void onPlayerPickupItem(PlayerPickupItemEvent event) { final User user = ess.getUser(event.getPlayer()); final ItemStack item = event.getItem().getItemStack(); - if (!metaPermCheck(user, "craft", item.getTypeId(), item.getData().getData())) + if (!metaPermCheck(user, "pickup", item.getTypeId(), item.getData().getData())) { event.setCancelled(true); event.getItem().setPickupDelay(50); @@ -271,7 +271,7 @@ public class EssentialsAntiBuildListener implements Listener } - @EventHandler(priority = EventPriority.LOW) + @EventHandler(priority = EventPriority.LOW, ignoreCancelled = true) public void onPlayerDropItem(PlayerDropItemEvent event) { |