mirror of
https://github.com/DieReicheErethons/Brewery.git
synced 2025-02-19 01:41:22 +01:00
Java 17 & update dependencies
This commit is contained in:
parent
87fd5deb80
commit
9928192d55
34
pom.xml
34
pom.xml
@ -38,8 +38,8 @@
|
||||
<artifactId>maven-compiler-plugin</artifactId>
|
||||
<version>3.10.1</version>
|
||||
<configuration>
|
||||
<source>1.8</source>
|
||||
<target>1.8</target>
|
||||
<source>1.17</source>
|
||||
<target>1.17</target>
|
||||
<encoding>UTF-8</encoding>
|
||||
</configuration>
|
||||
</plugin>
|
||||
@ -47,7 +47,7 @@
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-shade-plugin</artifactId>
|
||||
<version>3.2.1</version>
|
||||
<version>3.5.0</version>
|
||||
<executions>
|
||||
<execution>
|
||||
<phase>package</phase>
|
||||
@ -130,12 +130,12 @@
|
||||
<repository>
|
||||
<!-- BlockLocker -->
|
||||
<id>CodeMC</id>
|
||||
<url>https://repo.codemc.org/repository/maven-public</url>
|
||||
<url>https://repo.codemc.org/repository/maven-public/</url>
|
||||
</repository>
|
||||
<repository>
|
||||
<!-- MythicLib (MMOItems) -->
|
||||
<id>MMOPlugins</id>
|
||||
<url>https://mvn.lumine.io/repository/maven/</url>
|
||||
<id>phoenix</id>
|
||||
<url>https://nexus.phoenixdevt.fr/repository/maven-public/</url>
|
||||
</repository>
|
||||
<repository>
|
||||
<!-- Shopkeepers -->
|
||||
@ -149,7 +149,7 @@
|
||||
<dependency>
|
||||
<groupId>org.spigotmc</groupId>
|
||||
<artifactId>spigot-api</artifactId>
|
||||
<version>1.19-R0.1-SNAPSHOT</version>
|
||||
<version>1.20.2-R0.1-SNAPSHOT</version>
|
||||
<scope>provided</scope>
|
||||
<exclusions>
|
||||
<exclusion>
|
||||
@ -166,7 +166,7 @@
|
||||
<!-- https://bstats.org/getting-started/include-metrics -->
|
||||
<groupId>org.bstats</groupId>
|
||||
<artifactId>bstats-bukkit</artifactId>
|
||||
<version>3.0.0</version>
|
||||
<version>3.0.2</version>
|
||||
<scope>compile</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
@ -197,7 +197,7 @@
|
||||
<!-- https://dev.bukkit.org/projects/worldedit/files -->
|
||||
<groupId>com.sk89q.worldedit</groupId>
|
||||
<artifactId>worldedit-bukkit</artifactId>
|
||||
<version>7.2.11-beta-01</version>
|
||||
<version>7.3.0-SNAPSHOT</version>
|
||||
<scope>provided</scope>
|
||||
<exclusions>
|
||||
<exclusion>
|
||||
@ -209,7 +209,7 @@
|
||||
<dependency>
|
||||
<groupId>com.sk89q.worldedit</groupId>
|
||||
<artifactId>worldedit-core</artifactId>
|
||||
<version>7.2.11-beta-01</version>
|
||||
<version>7.3.0-SNAPSHOT</version>
|
||||
<scope>provided</scope>
|
||||
<exclusions>
|
||||
<exclusion>
|
||||
@ -222,7 +222,7 @@
|
||||
<!-- https://dev.bukkit.org/projects/worldguard/files -->
|
||||
<groupId>com.sk89q.worldguard</groupId>
|
||||
<artifactId>worldguard-core</artifactId>
|
||||
<version>7.0.4</version>
|
||||
<version>7.0.9</version>
|
||||
<scope>provided</scope>
|
||||
<exclusions>
|
||||
<exclusion>
|
||||
@ -235,7 +235,7 @@
|
||||
<!-- https://www.spigotmc.org/resources/lwc-extended.69551/history -->
|
||||
<groupId>com.griefcraft.lwc</groupId>
|
||||
<artifactId>LWCX</artifactId>
|
||||
<version>2.2.8</version>
|
||||
<version>2.2.9-dev</version>
|
||||
<scope>provided</scope>
|
||||
<exclusions>
|
||||
<exclusion>
|
||||
@ -248,7 +248,7 @@
|
||||
<!-- https://www.spigotmc.org/resources/griefprevention.1884/history -->
|
||||
<groupId>com.github.TechFortress</groupId>
|
||||
<artifactId>GriefPrevention</artifactId>
|
||||
<version>16.17.1</version>
|
||||
<version>16.18.1</version>
|
||||
<scope>provided</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
@ -268,7 +268,7 @@
|
||||
<!-- https://github.com/Slimefun/Slimefun4/releases -->
|
||||
<groupId>com.github.Slimefun</groupId>
|
||||
<artifactId>Slimefun4</artifactId>
|
||||
<version>RC-32</version>
|
||||
<version>RC-35</version>
|
||||
<scope>provided</scope>
|
||||
</dependency>
|
||||
<!--<dependency>
|
||||
@ -282,7 +282,7 @@
|
||||
<!-- https://www.spigotmc.org/resources/mythiclib.90306/history -->
|
||||
<groupId>io.lumine</groupId>
|
||||
<artifactId>MythicLib-dist</artifactId>
|
||||
<version>1.3.1</version>
|
||||
<version>1.6-SNAPSHOT</version>
|
||||
<scope>provided</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
@ -296,14 +296,14 @@
|
||||
<!-- https://www.spigotmc.org/resources/towny-advanced.72694/history -->
|
||||
<groupId>com.github.TownyAdvanced</groupId>
|
||||
<artifactId>Towny</artifactId>
|
||||
<version>0.98.3.0</version>
|
||||
<version>0.100.0.0</version>
|
||||
<scope>provided</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<!-- https://www.spigotmc.org/resources/shopkeepers.80756/history -->
|
||||
<groupId>com.nisovin.shopkeepers</groupId>
|
||||
<artifactId>ShopkeepersAPI</artifactId>
|
||||
<version>2.16.0</version>
|
||||
<version>2.18.0</version>
|
||||
<scope>provided</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
|
@ -3,10 +3,13 @@ package com.dre.brewery.integration.barrel;
|
||||
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 class GriefPreventionBarrel {
|
||||
Claim claim = griefPrevention.dataStore.getClaimAt(event.getSpigot().getLocation(), false, playerData.lastClaim);
|
||||
if (claim != null) {
|
||||
playerData.lastClaim = claim;
|
||||
String noContainersReason = claim.allowContainers(player);
|
||||
Supplier<String> supplier = claim.checkPermission(player, ClaimPermission.Inventory, null);
|
||||
String noContainersReason = supplier != null ? supplier.get() : null;
|
||||
if (noContainersReason != null) {
|
||||
return false;
|
||||
}
|
||||
|
@ -14,15 +14,8 @@ public class TownyBarrel {
|
||||
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);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user