mirror of
https://github.com/plexusorg/Plex-FAWE.git
synced 2024-12-22 17:27:38 +00:00
Move to ServerLib
This commit is contained in:
parent
9cfcaa7605
commit
86ecd9f553
@ -64,6 +64,13 @@ repositories {
|
||||
includeGroup("org.bstats")
|
||||
}
|
||||
}
|
||||
maven {
|
||||
name = "IntellectualSites 3rd Party"
|
||||
url = uri("https://mvn.intellectualsites.com/content/repositories/thirdparty")
|
||||
content {
|
||||
includeGroup("de.notmyfault")
|
||||
}
|
||||
}
|
||||
flatDir { dir(File("src/main/resources")) }
|
||||
}
|
||||
|
||||
@ -117,6 +124,7 @@ dependencies {
|
||||
implementation("com.palmergames.bukkit:towny:0.84.0.9") { isTransitive = false }
|
||||
implementation("com.thevoxelbox.voxelsniper:voxelsniper:5.171.0") { isTransitive = false }
|
||||
implementation("com.comphenix.protocol:ProtocolLib:4.5.1") { isTransitive = false }
|
||||
implementation("de.notmyfault:serverlib:1.0.0")
|
||||
}
|
||||
|
||||
tasks.named<Copy>("processResources") {
|
||||
@ -147,6 +155,7 @@ tasks.named<ShadowJar>("shadowJar") {
|
||||
include(dependency("org.slf4j:slf4j-api"))
|
||||
include(dependency("org.apache.logging.log4j:log4j-slf4j-impl"))
|
||||
include(dependency("org.antlr:antlr4-runtime"))
|
||||
include(dependency("de.notmyfault:serverlib"))
|
||||
relocate("io.papermc.lib", "com.sk89q.worldedit.bukkit.paperlib") {
|
||||
include(dependency("io.papermc:paperlib:1.0.6"))
|
||||
}
|
||||
|
@ -1,18 +0,0 @@
|
||||
package com.boydti.fawe.bukkit.util;
|
||||
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
public class SaneSoftwareCheck {
|
||||
|
||||
private static final Logger log = LoggerFactory.getLogger(SaneSoftwareCheck.class);
|
||||
|
||||
public static Class<?> checkVersion() {
|
||||
try {
|
||||
Class.forName("org.yatopiamc.yatopia.server.YatopiaConfig");
|
||||
} catch (ClassNotFoundException e) {
|
||||
return null;
|
||||
} log.warn("You are running a server fork that is known to be extremely dangerous and lead to data loss. It is strongly recommended you switch to a more stable, high-performing server software, like Paper.");
|
||||
return null;
|
||||
}
|
||||
}
|
@ -49,6 +49,7 @@ import com.sk89q.worldedit.world.entity.EntityType;
|
||||
import com.sk89q.worldedit.world.gamemode.GameModes;
|
||||
import com.sk89q.worldedit.world.item.ItemCategory;
|
||||
import com.sk89q.worldedit.world.weather.WeatherTypes;
|
||||
import de.notmyfault.serverlib.ServerLib;
|
||||
import io.papermc.lib.PaperLib;
|
||||
import org.bstats.bukkit.Metrics;
|
||||
import org.bukkit.Bukkit;
|
||||
@ -84,7 +85,6 @@ import java.util.Optional;
|
||||
import java.util.logging.Level;
|
||||
|
||||
import static com.boydti.fawe.bukkit.util.JavaVersionCheck.checkJvm;
|
||||
import static com.boydti.fawe.bukkit.util.SaneSoftwareCheck.checkVersion;
|
||||
import static com.google.common.base.Preconditions.checkNotNull;
|
||||
import static com.sk89q.worldedit.internal.anvil.ChunkDeleter.DELCHUNKS_FILE_NAME;
|
||||
|
||||
@ -179,7 +179,7 @@ public class WorldEditPlugin extends JavaPlugin { //implements TabCompleter
|
||||
// Check whether the server runs on 11 or greater
|
||||
checkJvm();
|
||||
// Check if we are in a safe environment
|
||||
checkVersion();
|
||||
ServerLib.checkUnsafeForks();
|
||||
}
|
||||
|
||||
private void setupPreWorldData() {
|
||||
|
Loading…
Reference in New Issue
Block a user