aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/at/hannibal2/skyhanni
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/java/at/hannibal2/skyhanni')
-rw-r--r--src/main/java/at/hannibal2/skyhanni/features/misc/QuickModMenuSwitch.kt9
1 files changed, 8 insertions, 1 deletions
diff --git a/src/main/java/at/hannibal2/skyhanni/features/misc/QuickModMenuSwitch.kt b/src/main/java/at/hannibal2/skyhanni/features/misc/QuickModMenuSwitch.kt
index 2f21ebe03..6d97d5a74 100644
--- a/src/main/java/at/hannibal2/skyhanni/features/misc/QuickModMenuSwitch.kt
+++ b/src/main/java/at/hannibal2/skyhanni/features/misc/QuickModMenuSwitch.kt
@@ -77,12 +77,19 @@ object QuickModMenuSwitch {
}
private fun shouldShow(mods: List<Mod>): Boolean {
- if (config.insideEscapeMenu && latestGuiPath == "net.minecraft.client.gui.GuiIngameMenu") return true
+ if (config.insideEscapeMenu && isEscapeMenu(latestGuiPath)) return true
if (config.insidePlayerInventory && latestGuiPath == "net.minecraft.client.gui.inventory.GuiInventory") return true
return mods.any { it.isInGui() }
}
+ private fun isEscapeMenu(path: String) = when (path) {
+ "net.minecraft.client.gui.GuiIngameMenu" -> true
+ "me.powns.togglesneak.gui.screens.GuiOptionsReplace" -> true
+
+ else -> false
+ }
+
private fun handleAbstractGuis(openGui: String): String {
if (openGui == "gg.essential.vigilance.gui.SettingsGui") {
val clazz = Class.forName("gg.essential.vigilance.gui.SettingsGui")