Let's just use interactable items onPlayerInteract
This commit is contained in:
parent
d9a8de33eb
commit
f658a6de74
Binary file not shown.
@ -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);
|
||||||
|
Loading…
Reference in New Issue
Block a user