Split up utility class
This commit is contained in:
parent
828af8443f
commit
e2c2505b2b
97 changed files with 2369 additions and 2104 deletions
|
|
@ -35,14 +35,15 @@ import net.coreprotect.patch.Patch;
|
|||
import net.coreprotect.spigot.SpigotAdapter;
|
||||
import net.coreprotect.utility.Chat;
|
||||
import net.coreprotect.utility.Color;
|
||||
import net.coreprotect.utility.Util;
|
||||
import net.coreprotect.utility.SystemUtils;
|
||||
import net.coreprotect.utility.VersionUtils;
|
||||
import oshi.hardware.CentralProcessor;
|
||||
|
||||
public class ConfigHandler extends Queue {
|
||||
public static int SERVER_VERSION = 0;
|
||||
public static final int EDITION_VERSION = 2;
|
||||
public static final String EDITION_BRANCH = Util.getBranch();
|
||||
public static final String EDITION_NAME = Util.getPluginName();
|
||||
public static final String EDITION_BRANCH = VersionUtils.getBranch();
|
||||
public static final String EDITION_NAME = VersionUtils.getPluginName();
|
||||
public static final String COMMUNITY_EDITION = "Community Edition";
|
||||
public static final String JAVA_VERSION = "11.0";
|
||||
public static final String MINECRAFT_VERSION = "1.16";
|
||||
|
|
@ -59,10 +60,10 @@ public class ConfigHandler extends Queue {
|
|||
public static int maximumPoolSize = 10;
|
||||
|
||||
public static HikariDataSource hikariDataSource = null;
|
||||
public static final CentralProcessor processorInfo = Util.getProcessorInfo();
|
||||
public static final boolean isSpigot = Util.isSpigot();
|
||||
public static final boolean isPaper = Util.isPaper();
|
||||
public static final boolean isFolia = Util.isFolia();
|
||||
public static final CentralProcessor processorInfo = SystemUtils.getProcessorInfo();
|
||||
public static final boolean isSpigot = VersionUtils.isSpigot();
|
||||
public static final boolean isPaper = VersionUtils.isPaper();
|
||||
public static final boolean isFolia = VersionUtils.isFolia();
|
||||
public static volatile boolean serverRunning = false;
|
||||
public static volatile boolean converterRunning = false;
|
||||
public static volatile boolean purgeRunning = false;
|
||||
|
|
@ -443,15 +444,15 @@ public class ConfigHandler extends Queue {
|
|||
ConfigHandler.loadTypes(statement); // Load material ID's into memory.
|
||||
|
||||
// Initialize WorldEdit logging
|
||||
if (Util.checkWorldEdit()) {
|
||||
if (VersionUtils.checkWorldEdit()) {
|
||||
PluginManager pluginManager = Bukkit.getServer().getPluginManager();
|
||||
Plugin worldEditPlugin = pluginManager.getPlugin("WorldEdit");
|
||||
if (worldEditPlugin != null && worldEditPlugin.isEnabled()) {
|
||||
Util.loadWorldEdit();
|
||||
VersionUtils.loadWorldEdit();
|
||||
}
|
||||
}
|
||||
else if (ConfigHandler.worldeditEnabled) {
|
||||
Util.unloadWorldEdit();
|
||||
VersionUtils.unloadWorldEdit();
|
||||
}
|
||||
|
||||
ConfigHandler.serverRunning = true; // Set as running before patching
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue