From 8f7011f956cec5b104c3142ac53e57c4a3798844 Mon Sep 17 00:00:00 2001 From: CalMWolfs <94038482+CalMWolfs@users.noreply.github.com> Date: Sat, 1 Jun 2024 19:32:32 +1000 Subject: Fix: Gui editor opening when not intended to (#1973) --- src/main/java/at/hannibal2/skyhanni/data/GuiEditManager.kt | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'src/main/java') 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 { -- cgit