diff options
author | CalMWolfs <94038482+CalMWolfs@users.noreply.github.com> | 2024-06-01 19:32:32 +1000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-06-01 11:32:32 +0200 |
commit | 8f7011f956cec5b104c3142ac53e57c4a3798844 (patch) | |
tree | d63e3866bb08884028d642255ac981c8eca096af /src | |
parent | af5dbdb3ad0f64f22bd0692d12483e7d040d7ac7 (diff) | |
download | skyhanni-8f7011f956cec5b104c3142ac53e57c4a3798844.tar.gz skyhanni-8f7011f956cec5b104c3142ac53e57c4a3798844.tar.bz2 skyhanni-8f7011f956cec5b104c3142ac53e57c4a3798844.zip |
Fix: Gui editor opening when not intended to (#1973)
Diffstat (limited to 'src')
-rw-r--r-- | src/main/java/at/hannibal2/skyhanni/data/GuiEditManager.kt | 5 |
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 { |