aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/main/java/at/hannibal2/skyhanni/features/event/diana/BurrowWarpHelper.kt2
-rw-r--r--src/main/java/at/hannibal2/skyhanni/utils/KeyboardManager.kt5
2 files changed, 6 insertions, 1 deletions
diff --git a/src/main/java/at/hannibal2/skyhanni/features/event/diana/BurrowWarpHelper.kt b/src/main/java/at/hannibal2/skyhanni/features/event/diana/BurrowWarpHelper.kt
index 32fa93e6d..0810d53e7 100644
--- a/src/main/java/at/hannibal2/skyhanni/features/event/diana/BurrowWarpHelper.kt
+++ b/src/main/java/at/hannibal2/skyhanni/features/event/diana/BurrowWarpHelper.kt
@@ -8,6 +8,7 @@ import at.hannibal2.skyhanni.utils.LorenzUtils
import at.hannibal2.skyhanni.utils.LorenzUtils.sorted
import at.hannibal2.skyhanni.utils.LorenzVec
import at.hannibal2.skyhanni.utils.SimpleTimeMark
+import net.minecraft.client.Minecraft
import net.minecraftforge.fml.common.eventhandler.SubscribeEvent
import kotlin.time.Duration.Companion.seconds
@@ -22,6 +23,7 @@ class BurrowWarpHelper {
if (!config.burrowNearestWarp) return
if (event.keyCode != config.keyBindWarp) return
+ if (Minecraft.getMinecraft().currentScreen != null) return
currentWarp?.let {
if (lastWarpTime.passedSince() > 5.seconds) {
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) {