mirror of
https://github.com/VolmitSoftware/Iris.git
synced 2025-12-29 03:59:06 +00:00
Fixed Crash on lower end servers + Cleanup
This commit is contained in:
@@ -61,13 +61,12 @@ public class ServerConfigurator {
|
||||
long tt = f.getLong("settings.timeout-time");
|
||||
|
||||
if (tt < TimeUnit.MINUTES.toSeconds(5)) {
|
||||
Iris.warn("Updating spigot.yml timeout-time: " + tt + " -> " + TimeUnit.MINUTES.toSeconds(5) + " (5 minutes)");
|
||||
Iris.warn("Updating spigot.yml timeout-time: " + tt + " -> " + TimeUnit.MINUTES.toSeconds(20) + " (5 minutes)");
|
||||
Iris.warn("You can disable this change (autoconfigureServer) in Iris settings, then change back the value.");
|
||||
f.set("settings.timeout-time", TimeUnit.MINUTES.toSeconds(5));
|
||||
f.save(spigotConfig);
|
||||
}
|
||||
}
|
||||
|
||||
private static void increasePaperWatchdog() throws IOException, InvalidConfigurationException {
|
||||
File spigotConfig = new File("config/paper-global.yml");
|
||||
FileConfiguration f = new YamlConfiguration();
|
||||
@@ -75,7 +74,7 @@ public class ServerConfigurator {
|
||||
long tt = f.getLong("watchdog.early-warning-delay");
|
||||
|
||||
if (tt < TimeUnit.MINUTES.toMillis(3)) {
|
||||
Iris.warn("Updating paper.yml watchdog early-warning-delay: " + tt + " -> " + TimeUnit.MINUTES.toMillis(3) + " (3 minutes)");
|
||||
Iris.warn("Updating paper.yml watchdog early-warning-delay: " + tt + " -> " + TimeUnit.MINUTES.toMillis(15) + " (3 minutes)");
|
||||
Iris.warn("You can disable this change (autoconfigureServer) in Iris settings, then change back the value.");
|
||||
f.set("watchdog.early-warning-delay", TimeUnit.MINUTES.toMillis(3));
|
||||
f.save(spigotConfig);
|
||||
|
||||
@@ -8,7 +8,6 @@ public class IrisSafeguard {
|
||||
public static void IrisSafeguardSystem() {
|
||||
Iris.info("Enabled Iris SafeGuard");
|
||||
ServerBootSFG.BootCheck();
|
||||
PerformanceSFG.calculatePerformance();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
package com.volmit.iris.engine.safeguard;
|
||||
|
||||
import com.volmit.iris.core.IrisSettings;
|
||||
import oshi.SystemInfo;
|
||||
import oshi.hardware.GlobalMemory;
|
||||
|
||||
@@ -9,13 +10,6 @@ public class PerformanceSFG {
|
||||
public static boolean lowPerformance = false;
|
||||
public static void calculatePerformance(){
|
||||
|
||||
if (getCPUModel().contains("Xeon")){
|
||||
lowPerformance = true;
|
||||
}
|
||||
if (getProcessMemory() < 5999){
|
||||
lowPerformance = true;
|
||||
}
|
||||
|
||||
// Todo RePixelated: Finish this
|
||||
}
|
||||
}
|
||||
|
||||
@@ -37,15 +37,12 @@ public class ServerBootSFG {
|
||||
for (Plugin plugin : plugins) {
|
||||
pluginName = plugin.getName();
|
||||
Boolean flag = incompatiblePlugins.get(pluginName);
|
||||
Iris.info("T65: " + pluginName);
|
||||
if (flag != null && !flag) {
|
||||
count++;
|
||||
incompatiblePlugins.put(pluginName, true);
|
||||
}
|
||||
}
|
||||
|
||||
Iris.info("TEST: " + incompatiblePlugins.get("Multiverse-Core"));
|
||||
|
||||
StringJoiner joiner = new StringJoiner(", ");
|
||||
for (Map.Entry<String, Boolean> entry : incompatiblePlugins.entrySet()) {
|
||||
if (entry.getValue()) {
|
||||
|
||||
Reference in New Issue
Block a user