Let's just use interactable items onPlayerInteract

This commit is contained in:
SvenjaReißaus 2019-03-18 22:47:57 -05:00
parent d9a8de33eb
commit f658a6de74
No known key found for this signature in database
GPG Key ID: E5494A03FA36D54B
2 changed files with 2 additions and 4 deletions

View File

@ -881,10 +881,8 @@ public class FactionsPlayerListener implements Listener {
if (block == null) return; // clicked in air, apparently
if (!canPlayerUseBlock(player, block, true) && !playerCanUseItemHere(player, block.getLocation(), event.getMaterial(), true) && !FactionsBlockListener.playerCanBuildDestroyBlock(player, block.getLocation(), "BUILD", true)) {
event.setCancelled(true);
return;
}
if (!block.getType().isInteractable()) return;
if (!canPlayerUseBlock(player, block, false)) {
event.setCancelled(true);
event.setUseInteractedBlock(Event.Result.DENY);