diff --git a/src/main/java/main/launchgui/ConfigHandler.java b/src/main/java/main/launchgui/ConfigHandler.java index 3408a92..d161bcb 100644 --- a/src/main/java/main/launchgui/ConfigHandler.java +++ b/src/main/java/main/launchgui/ConfigHandler.java @@ -8,11 +8,13 @@ public class ConfigHandler { //sections + public static String internal = "Internal"; public static String main = "Main"; public static String lines = "Lines"; //options public static boolean displayGuiOnLaunch; + public static String modToFind; public static String guiTitle; public static String line1; @@ -33,7 +35,8 @@ public static void init(Configuration config) { config.addCustomCategoryComment(lines, "These are the options for what your GUI says. Change them as you please, but try to keep them short. It won't split lines for you. Leave blank if unused."); - displayGuiOnLaunch = config.get(main, "displayGuiOnLaunch", true, "Whether or not to display the GUI on launch. Should not be touched.").getBoolean(displayGuiOnLaunch); + displayGuiOnLaunch = config.get(internal, "displayGuiOnLaunch", true, "Whether or not to display the GUI on launch. Should not be touched.").getBoolean(displayGuiOnLaunch); + modToFind = config.get(main, "modToFind", "LaunchGUI", "Requires this mod to load the GUI. To always load no matter what, use a mod that is always installed.").getString().toLowerCase(); guiTitle = config.get(lines, "guiTitle", "TITLE", "Title of your GUI. Appears at the top.").getString(); line1 = config.get(lines, "line1", "These are your information lines in the GUI").getString(); diff --git a/src/main/java/main/launchgui/gui/GuiEventHandler.java b/src/main/java/main/launchgui/gui/GuiEventHandler.java index b6645bc..95b7c87 100644 --- a/src/main/java/main/launchgui/gui/GuiEventHandler.java +++ b/src/main/java/main/launchgui/gui/GuiEventHandler.java @@ -16,7 +16,7 @@ public class GuiEventHandler { @SubscribeEvent @SideOnly(Side.CLIENT) public void openMainMenu(GuiOpenEvent event) { - if (shouldLoadGUI && ConfigHandler.displayGuiOnLaunch && Loader.isModLoaded("eirairc")) { + if (shouldLoadGUI && ConfigHandler.displayGuiOnLaunch && Loader.isModLoaded(ConfigHandler.modToFind)) { event.gui = new StartupGui(); shouldLoadGUI = false; }