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 (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)) { if (!block.getType().isInteractable()) return;
event.setCancelled(true);
return;
}
if (!canPlayerUseBlock(player, block, false)) { if (!canPlayerUseBlock(player, block, false)) {
event.setCancelled(true); event.setCancelled(true);
event.setUseInteractedBlock(Event.Result.DENY); event.setUseInteractedBlock(Event.Result.DENY);