This should fix last issue
This commit is contained in:
parent
c02af9207b
commit
6a24b34a70
Binary file not shown.
@ -752,13 +752,15 @@ public class FactionsPlayerListener implements Listener {
|
|||||||
|
|
||||||
if (block == null) return; // clicked in air, apparently
|
if (block == null) return; // clicked in air, apparently
|
||||||
SavageFactions.plugin.log("Checking for material permission");
|
SavageFactions.plugin.log("Checking for material permission");
|
||||||
if (GetPermissionFromUsableBlock(event.getClickedBlock().getType()) == null) return;
|
if (GetPermissionFromUsableBlock(event.getClickedBlock().getType()) != null) {
|
||||||
SavageFactions.plugin.log("Checking for use block permission");
|
SavageFactions.plugin.log("Checking for use block permission");
|
||||||
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);
|
||||||
return;
|
return;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
if (event.getMaterial().isSolid()) return;
|
||||||
SavageFactions.plugin.log("Checking if you can use that item");
|
SavageFactions.plugin.log("Checking if you can use that item");
|
||||||
if (!playerCanUseItemHere(player, block.getLocation(), event.getMaterial(), false)) {
|
if (!playerCanUseItemHere(player, block.getLocation(), event.getMaterial(), false)) {
|
||||||
event.setCancelled(true);
|
event.setCancelled(true);
|
||||||
|
Loading…
Reference in New Issue
Block a user