mirror of
https://github.com/VolmitSoftware/Iris.git
synced 2026-06-18 23:01:07 +00:00
Cleaned SFG a bit
This commit is contained in:
@@ -40,6 +40,7 @@ import com.volmit.iris.engine.platform.BukkitChunkGenerator;
|
|||||||
import com.volmit.iris.engine.platform.DummyChunkGenerator;
|
import com.volmit.iris.engine.platform.DummyChunkGenerator;
|
||||||
import com.volmit.iris.engine.safeguard.IrisSafeguard;
|
import com.volmit.iris.engine.safeguard.IrisSafeguard;
|
||||||
import com.volmit.iris.engine.safeguard.ServerBootSFG;
|
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.KList;
|
||||||
import com.volmit.iris.util.collection.KMap;
|
import com.volmit.iris.util.collection.KMap;
|
||||||
import com.volmit.iris.util.exceptions.IrisException;
|
import com.volmit.iris.util.exceptions.IrisException;
|
||||||
@@ -468,9 +469,9 @@ public class Iris extends VolmitPlugin implements Listener {
|
|||||||
J.s(this::setupPapi);
|
J.s(this::setupPapi);
|
||||||
J.a(ServerConfigurator::configure, 20);
|
J.a(ServerConfigurator::configure, 20);
|
||||||
splash();
|
splash();
|
||||||
ServerBootSFG.UnstableMode();
|
UtilsSFG.UnstableMode();
|
||||||
ServerBootSFG.SupportedServerSoftware();
|
UtilsSFG.SupportedServerSoftware();
|
||||||
ServerBootSFG.printIncompatiblePluginWarnings();
|
UtilsSFG.printIncompatiblePluginWarnings();
|
||||||
autoStartStudio();
|
autoStartStudio();
|
||||||
checkForBukkitWorlds();
|
checkForBukkitWorlds();
|
||||||
IrisToolbelt.retainMantleDataForSlice(String.class.getCanonicalName());
|
IrisToolbelt.retainMantleDataForSlice(String.class.getCanonicalName());
|
||||||
|
|||||||
@@ -28,6 +28,7 @@ import com.volmit.iris.engine.framework.Engine;
|
|||||||
import com.volmit.iris.engine.object.IrisDimension;
|
import com.volmit.iris.engine.object.IrisDimension;
|
||||||
import com.volmit.iris.engine.platform.PlatformChunkGenerator;
|
import com.volmit.iris.engine.platform.PlatformChunkGenerator;
|
||||||
import com.volmit.iris.engine.safeguard.ServerBootSFG;
|
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.KList;
|
||||||
import com.volmit.iris.util.decree.DecreeContext;
|
import com.volmit.iris.util.decree.DecreeContext;
|
||||||
import com.volmit.iris.util.decree.DecreeExecutor;
|
import com.volmit.iris.util.decree.DecreeExecutor;
|
||||||
@@ -88,7 +89,7 @@ public class CommandIris implements DecreeExecutor {
|
|||||||
sender().sendMessage(C.RED + "it is strongly advised for you to take action. see log for full detail");
|
sender().sendMessage(C.RED + "it is strongly advised for you to take action. see log for full detail");
|
||||||
sender().sendMessage(C.RED + "----------------------------------------------------------------");
|
sender().sendMessage(C.RED + "----------------------------------------------------------------");
|
||||||
sender().sendMessage(C.RED + "Command ran: /iris create");
|
sender().sendMessage(C.RED + "Command ran: /iris create");
|
||||||
sender().sendMessage(C.RED + ServerBootSFG.MSGIncompatibleWarnings());
|
sender().sendMessage(C.RED + UtilsSFG.MSGIncompatibleWarnings());
|
||||||
sender().sendMessage(C.RED + "----------------------------------------------------------------");
|
sender().sendMessage(C.RED + "----------------------------------------------------------------");
|
||||||
}
|
}
|
||||||
if (unstablemode && !multiverse) {
|
if (unstablemode && !multiverse) {
|
||||||
@@ -96,7 +97,7 @@ public class CommandIris implements DecreeExecutor {
|
|||||||
sender().sendMessage(C.RED + "Please rectify this problem to avoid further complications.");
|
sender().sendMessage(C.RED + "Please rectify this problem to avoid further complications.");
|
||||||
sender().sendMessage(C.RED + "----------------------------------------------------------------");
|
sender().sendMessage(C.RED + "----------------------------------------------------------------");
|
||||||
sender().sendMessage(C.RED + "Command ran: /iris create");
|
sender().sendMessage(C.RED + "Command ran: /iris create");
|
||||||
sender().sendMessage(C.RED + ServerBootSFG.MSGIncompatibleWarnings());
|
sender().sendMessage(C.RED + UtilsSFG.MSGIncompatibleWarnings());
|
||||||
sender().sendMessage(C.RED + "----------------------------------------------------------------");
|
sender().sendMessage(C.RED + "----------------------------------------------------------------");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -189,14 +190,14 @@ public class CommandIris implements DecreeExecutor {
|
|||||||
sender().sendMessage(C.RED + "Please rectify this problem to avoid further complications.");
|
sender().sendMessage(C.RED + "Please rectify this problem to avoid further complications.");
|
||||||
sender().sendMessage(C.RED + "----------------------------------------------------------------");
|
sender().sendMessage(C.RED + "----------------------------------------------------------------");
|
||||||
sender().sendMessage(C.RED + "Command ran: /iris fixunstable");
|
sender().sendMessage(C.RED + "Command ran: /iris fixunstable");
|
||||||
sender().sendMessage(C.RED + "Server Issues: " + C.DARK_RED + ServerBootSFG.MSGIncompatibleWarnings());
|
sender().sendMessage(C.RED + "Server Issues: " + C.DARK_RED + UtilsSFG.MSGIncompatibleWarnings());
|
||||||
sender().sendMessage(C.RED + "----------------------------------------------------------------");
|
sender().sendMessage(C.RED + "----------------------------------------------------------------");
|
||||||
}
|
}
|
||||||
Iris.info(C.RED + "Your server is experiencing an incompatibility with the Iris plugin.");
|
Iris.info(C.RED + "Your server is experiencing an incompatibility with the Iris plugin.");
|
||||||
Iris.info(C.RED + "Please rectify this problem to avoid further complications.");
|
Iris.info(C.RED + "Please rectify this problem to avoid further complications.");
|
||||||
Iris.info(C.RED + "----------------------------------------------------------------");
|
Iris.info(C.RED + "----------------------------------------------------------------");
|
||||||
Iris.info(C.RED + "Command ran: /iris fixunstable");
|
Iris.info(C.RED + "Command ran: /iris fixunstable");
|
||||||
ServerBootSFG.printIncompatiblePluginWarnings();
|
UtilsSFG.printIncompatiblePluginWarnings();
|
||||||
Iris.info(C.RED + "----------------------------------------------------------------");
|
Iris.info(C.RED + "----------------------------------------------------------------");
|
||||||
} else {
|
} else {
|
||||||
Iris.info(C.BLUE + "Iris is running stable..");
|
Iris.info(C.BLUE + "Iris is running stable..");
|
||||||
|
|||||||
@@ -27,6 +27,7 @@ import com.volmit.iris.core.service.StudioSVC;
|
|||||||
import com.volmit.iris.engine.object.IrisDimension;
|
import com.volmit.iris.engine.object.IrisDimension;
|
||||||
import com.volmit.iris.engine.platform.PlatformChunkGenerator;
|
import com.volmit.iris.engine.platform.PlatformChunkGenerator;
|
||||||
import com.volmit.iris.engine.safeguard.ServerBootSFG;
|
import com.volmit.iris.engine.safeguard.ServerBootSFG;
|
||||||
|
import com.volmit.iris.engine.safeguard.UtilsSFG;
|
||||||
import com.volmit.iris.util.exceptions.IrisException;
|
import com.volmit.iris.util.exceptions.IrisException;
|
||||||
import com.volmit.iris.util.format.C;
|
import com.volmit.iris.util.format.C;
|
||||||
import com.volmit.iris.util.format.Form;
|
import com.volmit.iris.util.format.Form;
|
||||||
@@ -114,7 +115,7 @@ public class IrisCreator {
|
|||||||
Iris.info(C.RED + "Your server is experiencing an incompatibility with the Iris plugin. Please rectify this problem to avoid further complications.");
|
Iris.info(C.RED + "Your server is experiencing an incompatibility with the Iris plugin. Please rectify this problem to avoid further complications.");
|
||||||
Iris.info(C.RED + "----------------------------------------------------------------");
|
Iris.info(C.RED + "----------------------------------------------------------------");
|
||||||
Iris.info(C.RED + "Operation ran: Loading Iris World..");
|
Iris.info(C.RED + "Operation ran: Loading Iris World..");
|
||||||
ServerBootSFG.printIncompatiblePluginWarnings();
|
UtilsSFG.printIncompatiblePluginWarnings();
|
||||||
Iris.info(C.RED + "----------------------------------------------------------------");
|
Iris.info(C.RED + "----------------------------------------------------------------");
|
||||||
}
|
}
|
||||||
if (Bukkit.isPrimaryThread()) {
|
if (Bukkit.isPrimaryThread()) {
|
||||||
|
|||||||
@@ -4,6 +4,7 @@ import com.volmit.iris.Iris;
|
|||||||
import com.volmit.iris.core.nms.INMS;
|
import com.volmit.iris.core.nms.INMS;
|
||||||
import com.volmit.iris.core.nms.v1X.NMSBinding1X;
|
import com.volmit.iris.core.nms.v1X.NMSBinding1X;
|
||||||
import com.volmit.iris.util.format.C;
|
import com.volmit.iris.util.format.C;
|
||||||
|
import lombok.Getter;
|
||||||
import org.bukkit.Bukkit;
|
import org.bukkit.Bukkit;
|
||||||
import org.bukkit.plugin.Plugin;
|
import org.bukkit.plugin.Plugin;
|
||||||
|
|
||||||
@@ -13,7 +14,7 @@ import java.util.List;
|
|||||||
import static com.volmit.iris.Iris.dump;
|
import static com.volmit.iris.Iris.dump;
|
||||||
import static com.volmit.iris.Iris.instance;
|
import static com.volmit.iris.Iris.instance;
|
||||||
import static com.volmit.iris.engine.safeguard.IrisSafeguard.unstablemode;
|
import static com.volmit.iris.engine.safeguard.IrisSafeguard.unstablemode;
|
||||||
|
@Getter
|
||||||
public class ServerBootSFG {
|
public class ServerBootSFG {
|
||||||
public static boolean multiverse = false;
|
public static boolean multiverse = false;
|
||||||
public static boolean dynmap = false;
|
public static boolean dynmap = false;
|
||||||
@@ -77,95 +78,4 @@ public class ServerBootSFG {
|
|||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
public static void UnstableMode(){
|
|
||||||
if (unstablemode) {
|
|
||||||
Iris.safeguard(C.DARK_RED + "Iris is running in Unstable Mode");
|
|
||||||
} else {
|
|
||||||
Iris.safeguard(C.BLUE + "Iris is running Stable");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
public static void SupportedServerSoftware(){
|
|
||||||
if (!passedserversoftware) {
|
|
||||||
Iris.safeguard(C.DARK_RED + "Server is running unsupported server software");
|
|
||||||
Iris.safeguard(C.RED + "Supported: Purpur, Pufferfish, Paper, Spigot, Bukkit");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
public static void printIncompatiblePluginWarnings(){
|
|
||||||
// String SupportedIrisVersion = getDescription().getVersion(); //todo Automatic version
|
|
||||||
|
|
||||||
if (safeguardPassed) {
|
|
||||||
Iris.safeguard(C.BLUE + "0 Conflicts found");
|
|
||||||
} else {
|
|
||||||
Iris.safeguard(C.DARK_RED + "" + count + " Conflicts found");
|
|
||||||
unstablemode = true;
|
|
||||||
|
|
||||||
if (multiverse) {
|
|
||||||
Iris.safeguard(C.RED + "Multiverse");
|
|
||||||
Iris.safeguard(C.RED + "- The plugin Multiverse is not compatible with the server.");
|
|
||||||
Iris.safeguard(C.RED + "- If you want to have a world manager, consider using PhantomWorlds or MyWorlds instead.");
|
|
||||||
}
|
|
||||||
if (dynmap) {
|
|
||||||
Iris.safeguard(C.RED + "Dynmap");
|
|
||||||
Iris.safeguard(C.RED + "- The plugin Dynmap is not compatible with the server.");
|
|
||||||
Iris.safeguard(C.RED + "- If you want to have a map plugin like Dynmap, consider Bluemap or LiveAtlas.");
|
|
||||||
}
|
|
||||||
if (terraform || stratos) {
|
|
||||||
Iris.safeguard(C.YELLOW + "Terraform Generator / Stratos");
|
|
||||||
Iris.safeguard(C.YELLOW + "- Iris is not compatible with other worldgen plugins.");
|
|
||||||
}
|
|
||||||
if (unsuportedversion) {
|
|
||||||
Iris.safeguard(C.RED + "Server Version");
|
|
||||||
Iris.safeguard(C.RED + "- Iris only supports 1.19.2 > 1.20.2");
|
|
||||||
}
|
|
||||||
if (!passedserversoftware) {
|
|
||||||
Iris.safeguard(C.RED + "Unsupported Server Software");
|
|
||||||
Iris.safeguard(C.RED + "- Please consider using Paper or Purpur instead.");
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public static String MSGIncompatibleWarnings(){
|
|
||||||
StringBuilder stringBuilder = new StringBuilder();
|
|
||||||
|
|
||||||
List<String> incompatibleList = new ArrayList<>();
|
|
||||||
|
|
||||||
if (multiverse) {
|
|
||||||
String incompatibility1 = "Multiverse";
|
|
||||||
stringBuilder.append(incompatibility1).append(", ");
|
|
||||||
incompatibleList.add(incompatibility1);
|
|
||||||
}
|
|
||||||
if(dynmap) {
|
|
||||||
String incompatibility2 = "Dynmap";
|
|
||||||
stringBuilder.append(incompatibility2).append(", ");
|
|
||||||
incompatibleList.add(incompatibility2);
|
|
||||||
}
|
|
||||||
if (terraform) {
|
|
||||||
String incompatibility3 = "Terraform";
|
|
||||||
stringBuilder.append(incompatibility3).append(", ");
|
|
||||||
incompatibleList.add(incompatibility3);
|
|
||||||
}
|
|
||||||
if(stratos){
|
|
||||||
String incompatibility4 = "Stratos";
|
|
||||||
stringBuilder.append(incompatibility4).append(", ");
|
|
||||||
incompatibleList.add(incompatibility4);
|
|
||||||
|
|
||||||
}
|
|
||||||
if(unsuportedversion){
|
|
||||||
String incompatibility5 = "Server Version";
|
|
||||||
stringBuilder.append(incompatibility5).append(", ");
|
|
||||||
incompatibleList.add(incompatibility5);
|
|
||||||
|
|
||||||
}
|
|
||||||
if(!passedserversoftware){
|
|
||||||
String incompatibility6 = "Server Software";
|
|
||||||
stringBuilder.append(incompatibility6).append(", ");
|
|
||||||
incompatibleList.add(incompatibility6);
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
String MSGIncompatiblePlugins = stringBuilder.toString();
|
|
||||||
return MSGIncompatiblePlugins;
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,6 +1,104 @@
|
|||||||
package com.volmit.iris.engine.safeguard;
|
package com.volmit.iris.engine.safeguard;
|
||||||
|
|
||||||
|
import com.volmit.iris.Iris;
|
||||||
|
import com.volmit.iris.util.format.C;
|
||||||
|
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
import static com.volmit.iris.engine.safeguard.IrisSafeguard.unstablemode;
|
||||||
|
import static com.volmit.iris.engine.safeguard.ServerBootSFG.*;
|
||||||
|
|
||||||
public class UtilsSFG {
|
public class UtilsSFG {
|
||||||
public static void resetdatapacks(){
|
public static void UnstableMode(){
|
||||||
|
if (unstablemode) {
|
||||||
|
Iris.safeguard(C.DARK_RED + "Iris is running in Unstable Mode");
|
||||||
|
} else {
|
||||||
|
Iris.safeguard(C.BLUE + "Iris is running Stable");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
public static void SupportedServerSoftware(){
|
||||||
|
if (!passedserversoftware) {
|
||||||
|
Iris.safeguard(C.DARK_RED + "Server is running unsupported server software");
|
||||||
|
Iris.safeguard(C.RED + "Supported: Purpur, Pufferfish, Paper, Spigot, Bukkit");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
public static void printIncompatiblePluginWarnings(){
|
||||||
|
// String SupportedIrisVersion = getDescription().getVersion(); //todo Automatic version
|
||||||
|
|
||||||
|
if (safeguardPassed) {
|
||||||
|
Iris.safeguard(C.BLUE + "0 Conflicts found");
|
||||||
|
} else {
|
||||||
|
Iris.safeguard(C.DARK_RED + "" + count + " Conflicts found");
|
||||||
|
unstablemode = true;
|
||||||
|
|
||||||
|
if (multiverse) {
|
||||||
|
Iris.safeguard(C.RED + "Multiverse");
|
||||||
|
Iris.safeguard(C.RED + "- The plugin Multiverse is not compatible with the server.");
|
||||||
|
Iris.safeguard(C.RED + "- If you want to have a world manager, consider using PhantomWorlds or MyWorlds instead.");
|
||||||
|
}
|
||||||
|
if (dynmap) {
|
||||||
|
Iris.safeguard(C.RED + "Dynmap");
|
||||||
|
Iris.safeguard(C.RED + "- The plugin Dynmap is not compatible with the server.");
|
||||||
|
Iris.safeguard(C.RED + "- If you want to have a map plugin like Dynmap, consider Bluemap or LiveAtlas.");
|
||||||
|
}
|
||||||
|
if (terraform || stratos) {
|
||||||
|
Iris.safeguard(C.YELLOW + "Terraform Generator / Stratos");
|
||||||
|
Iris.safeguard(C.YELLOW + "- Iris is not compatible with other worldgen plugins.");
|
||||||
|
}
|
||||||
|
if (unsuportedversion) {
|
||||||
|
Iris.safeguard(C.RED + "Server Version");
|
||||||
|
Iris.safeguard(C.RED + "- Iris only supports 1.19.2 > 1.20.2");
|
||||||
|
}
|
||||||
|
if (!passedserversoftware) {
|
||||||
|
Iris.safeguard(C.RED + "Unsupported Server Software");
|
||||||
|
Iris.safeguard(C.RED + "- Please consider using Paper or Purpur instead.");
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public static String MSGIncompatibleWarnings(){
|
||||||
|
StringBuilder stringBuilder = new StringBuilder();
|
||||||
|
|
||||||
|
List<String> incompatibleList = new ArrayList<>();
|
||||||
|
|
||||||
|
if (multiverse) {
|
||||||
|
String incompatibility1 = "Multiverse";
|
||||||
|
stringBuilder.append(incompatibility1).append(", ");
|
||||||
|
incompatibleList.add(incompatibility1);
|
||||||
|
}
|
||||||
|
if(dynmap) {
|
||||||
|
String incompatibility2 = "Dynmap";
|
||||||
|
stringBuilder.append(incompatibility2).append(", ");
|
||||||
|
incompatibleList.add(incompatibility2);
|
||||||
|
}
|
||||||
|
if (terraform) {
|
||||||
|
String incompatibility3 = "Terraform";
|
||||||
|
stringBuilder.append(incompatibility3).append(", ");
|
||||||
|
incompatibleList.add(incompatibility3);
|
||||||
|
}
|
||||||
|
if(stratos){
|
||||||
|
String incompatibility4 = "Stratos";
|
||||||
|
stringBuilder.append(incompatibility4).append(", ");
|
||||||
|
incompatibleList.add(incompatibility4);
|
||||||
|
|
||||||
|
}
|
||||||
|
if(unsuportedversion){
|
||||||
|
String incompatibility5 = "Server Version";
|
||||||
|
stringBuilder.append(incompatibility5).append(", ");
|
||||||
|
incompatibleList.add(incompatibility5);
|
||||||
|
|
||||||
|
}
|
||||||
|
if(!passedserversoftware){
|
||||||
|
String incompatibility6 = "Server Software";
|
||||||
|
stringBuilder.append(incompatibility6).append(", ");
|
||||||
|
incompatibleList.add(incompatibility6);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
String MSGIncompatiblePlugins = stringBuilder.toString();
|
||||||
|
return MSGIncompatiblePlugins;
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user