Move to ServerLib

This commit is contained in:
NotMyFault 2021-01-22 23:34:47 +01:00
parent 8292ed9e31
commit 86e8457574
No known key found for this signature in database
GPG Key ID: 158F5701A6AAD00C
3 changed files with 16 additions and 4 deletions

View File

@ -27,9 +27,16 @@ repositories {
} }
maven { maven {
name = "IntellectualSites" name = "IntellectualSites Releases"
url = uri("https://mvn.intellectualsites.com/content/repositories/releases") url = uri("https://mvn.intellectualsites.com/content/repositories/releases")
} }
maven {
name = "IntellectualSites 3rd Party"
url = uri("https://mvn.intellectualsites.com/content/repositories/thirdparty")
content {
includeGroup("de.notmyfault")
}
}
} }
dependencies { dependencies {
@ -40,10 +47,10 @@ dependencies {
// //
// Metrics // Metrics
implementation("org.bstats:bstats-bukkit:1.7") implementation("org.bstats:bstats-bukkit:1.8")
// Minecraft // Minecraft
compileOnlyApi("com.destroystokyo.paper:paper-api:1.16.4-R0.1-SNAPSHOT") compileOnlyApi("com.destroystokyo.paper:paper-api:1.16.5-R0.1-SNAPSHOT")
implementation("io.papermc:paperlib:1.0.6") implementation("io.papermc:paperlib:1.0.6")
// Plugins // Plugins
@ -62,6 +69,7 @@ dependencies {
// Other libraries // Other libraries
implementation("com.sk89q:squirrelid:1.0.0-SNAPSHOT") { isTransitive = false } implementation("com.sk89q:squirrelid:1.0.0-SNAPSHOT") { isTransitive = false }
implementation("de.notmyfault:serverlib:1.0.0")
// Our libraries // Our libraries
implementation("com.intellectualsites.arkitektonika:Arkitektonika-Client:2.0-SNAPSHOT") implementation("com.intellectualsites.arkitektonika:Arkitektonika-Client:2.0-SNAPSHOT")
@ -98,6 +106,7 @@ tasks.named<ShadowJar>("shadowJar") {
relocate("com.intellectualsites.arkitektonika", "com.plotsquared.core.arkitektonika") relocate("com.intellectualsites.arkitektonika", "com.plotsquared.core.arkitektonika")
relocate("com.intellectualsites.http", "com.plotsquared.core.http") relocate("com.intellectualsites.http", "com.plotsquared.core.http")
relocate("com.intellectualsites.paster", "com.plotsquared.core.paster") relocate("com.intellectualsites.paster", "com.plotsquared.core.paster")
relocate("de.notmyfault:serverlib", "com.plotsquared.bukkit.serverlib")
// Get rid of all the libs which are 100% unused. // Get rid of all the libs which are 100% unused.
minimize() minimize()

View File

@ -117,6 +117,7 @@ import com.plotsquared.core.uuid.CacheUUIDService;
import com.plotsquared.core.uuid.UUIDPipeline; import com.plotsquared.core.uuid.UUIDPipeline;
import com.plotsquared.core.uuid.offline.OfflineModeUUIDService; import com.plotsquared.core.uuid.offline.OfflineModeUUIDService;
import com.sk89q.worldedit.WorldEdit; import com.sk89q.worldedit.WorldEdit;
import de.notmyfault.serverlib.ServerLib;
import io.papermc.lib.PaperLib; import io.papermc.lib.PaperLib;
import net.kyori.adventure.audience.Audience; import net.kyori.adventure.audience.Audience;
import net.kyori.adventure.text.Component; import net.kyori.adventure.text.Component;
@ -541,6 +542,8 @@ public final class BukkitPlatform extends JavaPlugin implements Listener, PlotPl
// Check whether the server runs on 11 or greater // Check whether the server runs on 11 or greater
checkJvm(); checkJvm();
// Check if we are in a safe environment
ServerLib.checkUnsafeForks();
} }
private void unload() { private void unload() {

View File

@ -6,7 +6,7 @@ plugins {
java java
`java-library` `java-library`
`maven-publish` `maven-publish`
id("com.github.johnrengelman.shadow") version "6.0.0" id("com.github.johnrengelman.shadow") version "6.1.0"
id("net.minecrell.licenser") version "0.4.1" id("net.minecrell.licenser") version "0.4.1"
id("org.ajoberstar.grgit") version "4.1.0" id("org.ajoberstar.grgit") version "4.1.0"