Skip to content
This repository was archived by the owner on Jul 7, 2023. It is now read-only.

Commit 6a24b34

Browse files
author
SvenjaReißaus
committed
This should fix last issue
1 parent c02af92 commit 6a24b34

File tree

2 files changed

+8
-6
lines changed

2 files changed

+8
-6
lines changed
27 Bytes
Binary file not shown.

src/main/java/com/massivecraft/factions/listeners/FactionsPlayerListener.java

+8-6
Original file line numberDiff line numberDiff line change
@@ -752,13 +752,15 @@ public void onPlayerInteract(PlayerInteractEvent event) {
752752

753753
if (block == null) return; // clicked in air, apparently
754754
SavageFactions.plugin.log("Checking for material permission");
755-
if (GetPermissionFromUsableBlock(event.getClickedBlock().getType()) == null) return;
756-
SavageFactions.plugin.log("Checking for use block permission");
757-
if (!canPlayerUseBlock(player, block, false)) {
758-
event.setCancelled(true);
759-
event.setUseInteractedBlock(Event.Result.DENY);
760-
return;
755+
if (GetPermissionFromUsableBlock(event.getClickedBlock().getType()) != null) {
756+
SavageFactions.plugin.log("Checking for use block permission");
757+
if (!canPlayerUseBlock(player, block, false)) {
758+
event.setCancelled(true);
759+
event.setUseInteractedBlock(Event.Result.DENY);
760+
return;
761+
}
761762
}
763+
if (event.getMaterial().isSolid()) return;
762764
SavageFactions.plugin.log("Checking if you can use that item");
763765
if (!playerCanUseItemHere(player, block.getLocation(), event.getMaterial(), false)) {
764766
event.setCancelled(true);

0 commit comments

Comments
 (0)