mirror of
https://github.com/VolmitSoftware/Iris.git
synced 2025-12-29 03:59:06 +00:00
Cleaning and idi- i mean user issue prevention system. ALPHA
This commit is contained in:
@@ -39,7 +39,6 @@ import com.volmit.iris.engine.object.IrisWorld;
|
||||
import com.volmit.iris.engine.platform.BukkitChunkGenerator;
|
||||
import com.volmit.iris.engine.platform.DummyChunkGenerator;
|
||||
import com.volmit.iris.engine.safeguard.IrisSafeguard;
|
||||
import com.volmit.iris.engine.safeguard.ServerBootSFG;
|
||||
import com.volmit.iris.engine.safeguard.UtilsSFG;
|
||||
import com.volmit.iris.util.collection.KList;
|
||||
import com.volmit.iris.util.collection.KMap;
|
||||
@@ -472,6 +471,9 @@ public class Iris extends VolmitPlugin implements Listener {
|
||||
UtilsSFG.UnstableMode();
|
||||
UtilsSFG.SupportedServerSoftware();
|
||||
UtilsSFG.printIncompatiblePluginWarnings();
|
||||
|
||||
UtilsSFG.unstablePrompt();
|
||||
|
||||
autoStartStudio();
|
||||
checkForBukkitWorlds();
|
||||
IrisToolbelt.retainMantleDataForSlice(String.class.getCanonicalName());
|
||||
|
||||
@@ -145,6 +145,7 @@ public class IrisSettings {
|
||||
|
||||
@Data
|
||||
public static class IrisSettingsGeneral {
|
||||
public boolean bootUnstable = false;
|
||||
public boolean commandSounds = true;
|
||||
public boolean debug = false;
|
||||
public boolean disableNMS = false;
|
||||
|
||||
@@ -31,6 +31,7 @@ public class ServerBootSFG {
|
||||
Plugin[] plugins = pluginManager.getPlugins();
|
||||
if (INMS.get() instanceof NMSBinding1X) {
|
||||
unsuportedversion = true;
|
||||
count++;
|
||||
}
|
||||
|
||||
StringBuilder pluginList = new StringBuilder("Plugin list: ");
|
||||
@@ -58,8 +59,6 @@ public class ServerBootSFG {
|
||||
Iris.safeguard(pluginList.toString());
|
||||
}
|
||||
|
||||
if (unsuportedversion) count++;
|
||||
|
||||
if (
|
||||
!instance.getServer().getVersion().contains("Purpur") &&
|
||||
!instance.getServer().getVersion().contains("Paper") &&
|
||||
|
||||
@@ -1,13 +1,19 @@
|
||||
package com.volmit.iris.engine.safeguard;
|
||||
|
||||
import com.volmit.iris.Iris;
|
||||
import com.volmit.iris.core.IrisSettings;
|
||||
import com.volmit.iris.util.format.C;
|
||||
import org.bukkit.Bukkit;
|
||||
import org.bukkit.plugin.Plugin;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.Scanner;
|
||||
|
||||
import static com.volmit.iris.engine.safeguard.IrisSafeguard.unstablemode;
|
||||
import static com.volmit.iris.engine.safeguard.ServerBootSFG.*;
|
||||
import static org.bukkit.Bukkit.getLogger;
|
||||
import static org.bukkit.Bukkit.getServer;
|
||||
|
||||
public class UtilsSFG {
|
||||
public static void UnstableMode(){
|
||||
@@ -101,4 +107,41 @@ public class UtilsSFG {
|
||||
return MSGIncompatiblePlugins;
|
||||
|
||||
}
|
||||
|
||||
public static void unstablePrompt(){
|
||||
Iris.info("");
|
||||
Iris.info("");
|
||||
Iris.info("");
|
||||
Iris.info(C.DARK_GRAY + "--==<" + C.RED +" IMPORTANT " + C.DARK_GRAY + ">==--");
|
||||
Iris.info(C.RED + "Iris is running in unstable mode what may cause the following issues.");
|
||||
Iris.info(C.DARK_RED +"Server corruptions");
|
||||
Iris.info(C.RED + "- Server wont boot");
|
||||
Iris.info(C.RED + "- Worlds cant load due to corruption..");
|
||||
Iris.info(C.RED + "- And More..");
|
||||
Iris.info(C.DARK_RED + "World corruptions");
|
||||
Iris.info(C.RED + "- Worlds cant load due to corruption..");
|
||||
Iris.info(C.RED + "- Worlds may slowly corrupt till they wont be able to load.");
|
||||
Iris.info(C.RED + "- Worlds cant load due to corruption..");
|
||||
Iris.info(C.RED + "- And More..");
|
||||
Iris.info(C.DARK_RED + "ATTENTION:"+ C.RED + " While running iris in unstable mode you wont be eligible for support.");
|
||||
Iris.info("");
|
||||
/*while (true) {
|
||||
Iris.info("test2");
|
||||
if(IrisSettings.get().getGeneral().isBootUnstable()){
|
||||
Iris.info("AAAAAAAAAAAAAAAAAAA");
|
||||
}
|
||||
} */
|
||||
|
||||
if(!IrisSettings.get().getGeneral().isBootUnstable()){
|
||||
Iris.info(C.DARK_RED + "Go to plugins/iris/settings.json and set ignoreUnstable to true if you wish to proceed.");
|
||||
while (true) {
|
||||
try {
|
||||
Thread.sleep(1000);
|
||||
} catch (InterruptedException e) {
|
||||
// No
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user