diff --git a/Bukkit/build.gradle b/Bukkit/build.gradle index 8ce94360a..02237e7ab 100644 --- a/Bukkit/build.gradle +++ b/Bukkit/build.gradle @@ -13,6 +13,7 @@ repositories { } maven { url = "https://ci.ender.zone/plugin/repository/everything/" } maven { url = "https://mvn.intellectualsites.com/content/repositories/releases" } + maven { url = "https://mvn.intellectualsites.com/content/repositories/thirdparty"} maven { url = "https://mvn.intellectualsites.com/content/repositories/snapshots" } maven { url = "http://repo.mvdw-software.be/content/groups/public/" } mavenLocal() @@ -41,6 +42,7 @@ dependencies { compile("se.hyperver.hyperverse:Core:0.6.0-SNAPSHOT"){ transitive = false } compile('com.sk89q:squirrelid:1.0.0-SNAPSHOT'){ transitive = false } compile('be.maximvdw:MVdWPlaceholderAPI:3.1.1'){ transitive = false } + implementation("de.notmyfault:serverlib:1.0.0") } sourceCompatibility = 1.8 @@ -100,6 +102,7 @@ shadowJar { include(dependency("org.khelekore:prtree:1.7.0-SNAPSHOT")) include(dependency("com.sk89q:squirrelid:1.0.0-SNAPSHOT")) include(dependency("com.intellectualsites.paster:Paster:1.0.2-SNAPSHOT")) + include(dependency("de.notmyfault:serverlib:1.0.0")) } relocate('net.kyori.text', 'com.plotsquared.formatting.text') relocate("io.papermc.lib", "com.plotsquared.bukkit.paperlib") diff --git a/Bukkit/pom.xml b/Bukkit/pom.xml index 461b3748d..fdf7ae5c8 100644 --- a/Bukkit/pom.xml +++ b/Bukkit/pom.xml @@ -182,6 +182,12 @@ + + de.notmyfault + serverlib + 1.0.0 + runtime + junit junit diff --git a/Bukkit/src/main/java/com/plotsquared/bukkit/BukkitMain.java b/Bukkit/src/main/java/com/plotsquared/bukkit/BukkitMain.java index 54cdf00f1..df68aaa0f 100644 --- a/Bukkit/src/main/java/com/plotsquared/bukkit/BukkitMain.java +++ b/Bukkit/src/main/java/com/plotsquared/bukkit/BukkitMain.java @@ -118,6 +118,7 @@ import com.plotsquared.core.uuid.offline.OfflineModeUUIDService; import com.sk89q.worldedit.WorldEdit; import com.sk89q.worldedit.bukkit.WorldEditPlugin; import com.sk89q.worldedit.extension.platform.Actor; +import de.notmyfault.serverlib.ServerLib; import io.papermc.lib.PaperLib; import lombok.Getter; import lombok.NonNull; @@ -144,7 +145,6 @@ import org.jetbrains.annotations.Nullable; import java.io.File; import java.lang.reflect.Method; -import java.util.AbstractMap; import java.util.ArrayList; import java.util.Arrays; import java.util.HashMap; @@ -405,6 +405,9 @@ public final class BukkitMain extends JavaPlugin implements Listener, IPlotMain< getLogger().warning("Failed to clean up players: " + e.getMessage()); } }, 100L, 100L); + + // Check if we are in a safe environment + ServerLib.checkUnsafeForks(); } private void unload() { diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index 6c9a22477..28ff446a2 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -1,5 +1,5 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-6.6-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-6.8.1-bin.zip zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists