diff --git a/pom.xml b/pom.xml
index 3fdc8c1e..e96f1e1e 100644
--- a/pom.xml
+++ b/pom.xml
@@ -38,8 +38,8 @@
maven-compiler-plugin
3.10.1
-
- 1.8
+
+ 1.17
UTF-8
@@ -47,7 +47,7 @@
org.apache.maven.plugins
maven-shade-plugin
- 3.2.1
+ 3.5.0
package
@@ -130,12 +130,12 @@
CodeMC
- https://repo.codemc.org/repository/maven-public
+ https://repo.codemc.org/repository/maven-public/
- MMOPlugins
- https://mvn.lumine.io/repository/maven/
+ phoenix
+ https://nexus.phoenixdevt.fr/repository/maven-public/
@@ -149,7 +149,7 @@
org.spigotmc
spigot-api
- 1.19-R0.1-SNAPSHOT
+ 1.20.2-R0.1-SNAPSHOT
provided
@@ -166,7 +166,7 @@
org.bstats
bstats-bukkit
- 3.0.0
+ 3.0.2
compile
@@ -197,7 +197,7 @@
com.sk89q.worldedit
worldedit-bukkit
- 7.2.11-beta-01
+ 7.3.0-SNAPSHOT
provided
@@ -209,7 +209,7 @@
com.sk89q.worldedit
worldedit-core
- 7.2.11-beta-01
+ 7.3.0-SNAPSHOT
provided
@@ -222,7 +222,7 @@
com.sk89q.worldguard
worldguard-core
- 7.0.4
+ 7.0.9
provided
@@ -235,7 +235,7 @@
com.griefcraft.lwc
LWCX
- 2.2.8
+ 2.2.9-dev
provided
@@ -248,7 +248,7 @@
com.github.TechFortress
GriefPrevention
- 16.17.1
+ 16.18.1
provided
@@ -268,7 +268,7 @@
com.github.Slimefun
Slimefun4
- RC-32
+ RC-35
provided
io.lumine
MythicLib-dist
- 1.3.1
+ 1.6-SNAPSHOT
provided
@@ -296,14 +296,14 @@
com.github.TownyAdvanced
Towny
- 0.98.3.0
+ 0.100.0.0
provided
com.nisovin.shopkeepers
ShopkeepersAPI
- 2.16.0
+ 2.18.0
provided
diff --git a/src/com/dre/brewery/integration/barrel/GriefPreventionBarrel.java b/src/com/dre/brewery/integration/barrel/GriefPreventionBarrel.java
index 9337bed2..aa2d9fbd 100644
--- a/src/com/dre/brewery/integration/barrel/GriefPreventionBarrel.java
+++ b/src/com/dre/brewery/integration/barrel/GriefPreventionBarrel.java
@@ -3,10 +3,13 @@
import com.dre.brewery.P;
import com.dre.brewery.api.events.barrel.BarrelAccessEvent;
import me.ryanhamshire.GriefPrevention.Claim;
+import me.ryanhamshire.GriefPrevention.ClaimPermission;
import me.ryanhamshire.GriefPrevention.GriefPrevention;
import me.ryanhamshire.GriefPrevention.PlayerData;
import org.bukkit.entity.Player;
+import java.util.function.Supplier;
+
public class GriefPreventionBarrel {
private static P brewery = P.p;
@@ -29,7 +32,8 @@ public static boolean checkAccess(BarrelAccessEvent event) {
Claim claim = griefPrevention.dataStore.getClaimAt(event.getSpigot().getLocation(), false, playerData.lastClaim);
if (claim != null) {
playerData.lastClaim = claim;
- String noContainersReason = claim.allowContainers(player);
+ Supplier supplier = claim.checkPermission(player, ClaimPermission.Inventory, null);
+ String noContainersReason = supplier != null ? supplier.get() : null;
if (noContainersReason != null) {
return false;
}
diff --git a/src/com/dre/brewery/integration/barrel/TownyBarrel.java b/src/com/dre/brewery/integration/barrel/TownyBarrel.java
index 16927906..22f5fa7b 100644
--- a/src/com/dre/brewery/integration/barrel/TownyBarrel.java
+++ b/src/com/dre/brewery/integration/barrel/TownyBarrel.java
@@ -14,15 +14,8 @@ public static boolean checkAccess(BarrelAccessEvent event) {
Location barrelLoc = event.getSpigot().getLocation();
Material mat = P.use1_14 ? Material.BARREL : Material.CHEST;
- try {
- if (!TownySettings.isSwitchMaterial(mat, barrelLoc)) {
- return true;
- }
- } catch (Exception e) {
- //noinspection deprecation
- if (!TownySettings.isSwitchMaterial("CHEST")) {
- return true;
- }
+ if (!TownySettings.isSwitchMaterial(mat, barrelLoc)) {
+ return true;
}
return PlayerCacheUtil.getCachePermission(event.getPlayer(), barrelLoc, mat, TownyPermission.ActionType.SWITCH);
}