Enhance reload message

Dieser Commit ist enthalten in:
N0tMyFaultOG 2021-01-21 10:19:07 +01:00
Ursprung 1c4339ce1c
Commit 67f9e54285
Es konnte kein GPG-Schlüssel zu dieser Signatur gefunden werden
GPG-Schlüssel-ID: 823348042DA95A81
2 geänderte Dateien mit 23 neuen und 1 gelöschten Zeilen

Datei anzeigen

@ -0,0 +1,18 @@
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;
}
}

Datei anzeigen

@ -84,6 +84,7 @@ 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;
@ -162,7 +163,8 @@ public class WorldEditPlugin extends JavaPlugin { //implements TabCompleter
// register this so we can load world-dependent data right as the first world is loading
getServer().getPluginManager().registerEvents(new WorldInitListener(), this);
} else {
getLogger().warning("Server reload detected. This may cause various issues with WorldEdit and dependent plugins.");
getLogger().warning("Server reload detected. This may cause various issues with FastAsyncWorldEdit and dependent plugins.");
getLogger().warning("For more information, see https://matthewmiller.dev/blog/problem-with-reload/");
try {
setupPreWorldData();
// since worlds are loaded already, we can do this now
@ -176,6 +178,8 @@ 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();
}
private void setupPreWorldData() {