Switch to ServerLib

This commit is contained in:
NotMyFault 2021-01-22 23:42:45 +01:00
parent bf79639d07
commit e549235d83
No known key found for this signature in database
GPG Key ID: 158F5701A6AAD00C
4 changed files with 14 additions and 2 deletions

View File

@ -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")

View File

@ -182,6 +182,12 @@
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>de.notmyfault</groupId>
<artifactId>serverlib</artifactId>
<version>1.0.0</version>
<scope>runtime</scope>
</dependency>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>

View File

@ -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() {

View File

@ -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