aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/at/hannibal2
diff options
context:
space:
mode:
authorCalMWolfs <94038482+CalMWolfs@users.noreply.github.com>2024-06-01 19:32:32 +1000
committerGitHub <noreply@github.com>2024-06-01 11:32:32 +0200
commit8f7011f956cec5b104c3142ac53e57c4a3798844 (patch)
treed63e3866bb08884028d642255ac981c8eca096af /src/main/java/at/hannibal2
parentaf5dbdb3ad0f64f22bd0692d12483e7d040d7ac7 (diff)
downloadskyhanni-8f7011f956cec5b104c3142ac53e57c4a3798844.tar.gz
skyhanni-8f7011f956cec5b104c3142ac53e57c4a3798844.tar.bz2
skyhanni-8f7011f956cec5b104c3142ac53e57c4a3798844.zip
Fix: Gui editor opening when not intended to (#1973)
Diffstat (limited to 'src/main/java/at/hannibal2')
-rw-r--r--src/main/java/at/hannibal2/skyhanni/data/GuiEditManager.kt5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/main/java/at/hannibal2/skyhanni/data/GuiEditManager.kt b/src/main/java/at/hannibal2/skyhanni/data/GuiEditManager.kt
index f10565776..38da02e08 100644
--- a/src/main/java/at/hannibal2/skyhanni/data/GuiEditManager.kt
+++ b/src/main/java/at/hannibal2/skyhanni/data/GuiEditManager.kt
@@ -24,6 +24,7 @@ import net.minecraft.client.gui.inventory.GuiInventory
import net.minecraft.client.renderer.GlStateManager
import net.minecraftforge.fml.common.eventhandler.EventPriority
import net.minecraftforge.fml.common.eventhandler.SubscribeEvent
+import org.lwjgl.input.Keyboard
import org.lwjgl.opengl.GL11
import java.util.UUID
import kotlin.time.Duration.Companion.milliseconds
@@ -37,6 +38,10 @@ class GuiEditManager {
@SubscribeEvent
fun onKeyClick(event: LorenzKeyPressEvent) {
if (event.keyCode != SkyHanniMod.feature.gui.keyBindOpen) return
+ if (event.keyCode == Keyboard.KEY_RETURN) {
+ ChatUtils.chat("You can't use Enter as a keybind to open the gui editor!")
+ return
+ }
if (isInGui()) return
Minecraft.getMinecraft().currentScreen?.let {