aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/at/hannibal2/skyhanni/utils
diff options
context:
space:
mode:
authorhannibal2 <24389977+hannibal00212@users.noreply.github.com>2023-11-01 22:26:31 +0100
committerhannibal2 <24389977+hannibal00212@users.noreply.github.com>2023-11-01 22:26:31 +0100
commite3b0c5d5a0d05017a3f5e8fc8ecf17580e2c5474 (patch)
treeae5b7c26ecb4be6913256ca43f477167cf890b8d /src/main/java/at/hannibal2/skyhanni/utils
parent5c6ac5e309019f8216f5f020c82888d224cee3f9 (diff)
downloadskyhanni-e3b0c5d5a0d05017a3f5e8fc8ecf17580e2c5474.tar.gz
skyhanni-e3b0c5d5a0d05017a3f5e8fc8ecf17580e2c5474.tar.bz2
skyhanni-e3b0c5d5a0d05017a3f5e8fc8ecf17580e2c5474.zip
Disabled diana warp key while inside every gui.
Diffstat (limited to 'src/main/java/at/hannibal2/skyhanni/utils')
-rw-r--r--src/main/java/at/hannibal2/skyhanni/utils/KeyboardManager.kt5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/main/java/at/hannibal2/skyhanni/utils/KeyboardManager.kt b/src/main/java/at/hannibal2/skyhanni/utils/KeyboardManager.kt
index 3314bde7f..5078a492f 100644
--- a/src/main/java/at/hannibal2/skyhanni/utils/KeyboardManager.kt
+++ b/src/main/java/at/hannibal2/skyhanni/utils/KeyboardManager.kt
@@ -5,6 +5,7 @@ import at.hannibal2.skyhanni.events.LorenzTickEvent
import io.github.moulberry.moulconfig.gui.GuiScreenElementWrapper
import io.github.moulberry.moulconfig.internal.KeybindHelper
import net.minecraft.client.Minecraft
+import net.minecraft.client.gui.GuiChat
import net.minecraft.client.settings.KeyBinding
import net.minecraftforge.fml.common.eventhandler.SubscribeEvent
import org.apache.commons.lang3.SystemUtils
@@ -27,8 +28,10 @@ object KeyboardManager {
@SubscribeEvent
fun onTick(event: LorenzTickEvent) {
- val isConfigScreen = Minecraft.getMinecraft().currentScreen is GuiScreenElementWrapper
+ val currentScreen = Minecraft.getMinecraft().currentScreen
+ val isConfigScreen = currentScreen is GuiScreenElementWrapper
if (isConfigScreen) return
+ if (currentScreen is GuiChat) return
if (Mouse.getEventButtonState() && Mouse.getEventButton() != -1) {