should fix item usage issue

This commit is contained in:
Gabriele C 2015-09-13 15:18:22 +02:00
parent 76b4f62e79
commit 3cbc7ab18f

View File

@ -651,7 +651,7 @@ public class AuthMePlayerListener implements Listener {
event.setCancelled(true);
}
@EventHandler(ignoreCancelled = true, priority = EventPriority.LOWEST)
@EventHandler(ignoreCancelled = true, priority = EventPriority.NORMAL)
public void onPlayerInteract(PlayerInteractEvent event) {
if (event.getPlayer() == null)
return;
@ -675,8 +675,9 @@ public class AuthMePlayerListener implements Listener {
return;
}
}
if (event.getClickedBlock() != null && event.getClickedBlock().getType() != Material.AIR)
if (event.getClickedBlock() != null){
event.setUseInteractedBlock(org.bukkit.event.Event.Result.DENY);
}
event.setUseItemInHand(org.bukkit.event.Event.Result.DENY);
event.setCancelled(true);
}