Skip to content

Commit

Permalink
fix: catch return state returning false
Browse files Browse the repository at this point in the history
  • Loading branch information
Boy0000 committed May 8, 2024
1 parent fdb328c commit 755aa8e
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
@@ -1 +1 @@
pluginVersion=1.5.2
pluginVersion=1.5.3
8 changes: 4 additions & 4 deletions src/main/java/io/th0rgal/protectionlib/ProtectionLib.java
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ public static boolean canBuild(Player player, Location target) {
return compatibilities.stream().allMatch(compatibility -> compatibility.canBuild(player, target));
} catch (Exception e) {
if (debug) e.printStackTrace();
return false;
return true;
}
}

Expand All @@ -50,7 +50,7 @@ public static boolean canBreak(Player player, Location target) {
return compatibilities.stream().allMatch(compatibility -> compatibility.canBreak(player, target));
} catch (Exception e) {
if (debug) e.printStackTrace();
return false;
return true;
}
}

Expand All @@ -59,7 +59,7 @@ public static boolean canInteract(Player player, Location target) {
return compatibilities.stream().allMatch(compatibility -> compatibility.canInteract(player, target));
} catch (Exception e) {
if (debug) e.printStackTrace();
return false;
return true;
}
}

Expand All @@ -68,7 +68,7 @@ public static boolean canUse(Player player, Location target) {
return compatibilities.stream().allMatch(compatibility -> compatibility.canUse(player, target));
} catch (Exception e) {
if (debug) e.printStackTrace();
return false;
return true;
}
}

Expand Down

0 comments on commit 755aa8e

Please sign in to comment.