Skip to content
This repository has been archived by the owner on May 13, 2021. It is now read-only.

Commit

Permalink
Can now customize mod to look for
Browse files Browse the repository at this point in the history
  • Loading branch information
TehNut committed Jul 20, 2014
1 parent 2eccea1 commit f4bc99d
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
5 changes: 4 additions & 1 deletion src/main/java/main/launchgui/ConfigHandler.java
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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();
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/main/launchgui/gui/GuiEventHandler.java
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down

0 comments on commit f4bc99d

Please sign in to comment.