mirror of
https://github.com/GTNewHorizons/DummyCore.git
synced 2026-11-27 15:33:26 +00:00
Conditionally hide switch menu button
This commit is contained in:
1 parent
fe8d78b3b9
commit
f785b89d16
2 files changed
+3
-1
No files matched your search
@@ -11,6 +11,7 @@ public class DummyConfig implements IDummyConfig {
|
||||
public boolean removeMissingTexturesErrors;
|
||||
public static boolean enableNotifierLogging;
|
||||
public static boolean shouldChangeImage;
|
||||
public static boolean hideSwitchMenuButton;
|
||||
public static Configuration cfg;
|
||||
|
||||
public void load(Configuration config) {
|
||||
@@ -19,6 +20,7 @@ public class DummyConfig implements IDummyConfig {
|
||||
enableNotifierLogging = config.getBoolean("enableNotifierLogging", "GLOBAL", true, "");
|
||||
shouldChangeImage = config.getBoolean("shouldChangeImageInCreativeTabs", "GLOBAL", true, "");
|
||||
mainMenuID = config.getInt("mainMenuID", "GLOBAL", 0, 0, Integer.MAX_VALUE, "");
|
||||
hideSwitchMenuButton = config.getBoolean("hideSwitchMenuButton", "GLOBAL", false, "");
|
||||
dummyCoreSyncTimer = config.getInt(
|
||||
"syncTimer",
|
||||
"GLOBAL",
|
||||
|
||||
@@ -64,7 +64,7 @@ public class DummyEventHandler {
|
||||
@SideOnly(Side.CLIENT)
|
||||
@SubscribeEvent
|
||||
public void onMainMenuGUISetup(InitGuiEvent.Post event) {
|
||||
if (event.gui instanceof IMainMenu) {
|
||||
if (event.gui instanceof IMainMenu && !DummyConfig.hideSwitchMenuButton) {
|
||||
event.buttonList.add(
|
||||
new GuiButton_ChangeGUI(
|
||||
65535,
|
||||
|
||||
Reference in new issue
Block a user