diff options
author | hannibal2 <24389977+hannibal00212@users.noreply.github.com> | 2023-03-11 17:13:28 +0100 |
---|---|---|
committer | hannibal2 <24389977+hannibal00212@users.noreply.github.com> | 2023-03-11 17:13:28 +0100 |
commit | 8390612f3e956e77dd2523d003e4df9f61e370b4 (patch) | |
tree | e3582b62ba69e5287c236e8f1757fc843a670344 /src/main | |
parent | ddb85f57984ac76e766bd93b49bd356b11a0a07a (diff) | |
parent | 3adeadb8eca478f23111676fa82afdaa11a42896 (diff) | |
download | skyhanni-8390612f3e956e77dd2523d003e4df9f61e370b4.tar.gz skyhanni-8390612f3e956e77dd2523d003e4df9f61e370b4.tar.bz2 skyhanni-8390612f3e956e77dd2523d003e4df9f61e370b4.zip |
Merge remote-tracking branch 'origin/dev_3' into dev_3
Diffstat (limited to 'src/main')
-rw-r--r-- | src/main/java/at/hannibal2/skyhanni/mixins/transformers/gui/MixinGuiNewChat.java | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/main/java/at/hannibal2/skyhanni/mixins/transformers/gui/MixinGuiNewChat.java b/src/main/java/at/hannibal2/skyhanni/mixins/transformers/gui/MixinGuiNewChat.java index 31a915b05..bdc0b01c2 100644 --- a/src/main/java/at/hannibal2/skyhanni/mixins/transformers/gui/MixinGuiNewChat.java +++ b/src/main/java/at/hannibal2/skyhanni/mixins/transformers/gui/MixinGuiNewChat.java @@ -1,6 +1,7 @@ package at.hannibal2.skyhanni.mixins.transformers.gui; import at.hannibal2.skyhanni.SkyHanniMod; +import net.minecraft.client.Minecraft; import net.minecraft.client.gui.GuiNewChat; import org.lwjgl.input.Keyboard; import org.spongepowered.asm.mixin.Mixin; @@ -13,7 +14,9 @@ public class MixinGuiNewChat { @Inject(method = "getChatOpen", at = @At("HEAD"), cancellable = true) public void onIsOpen(CallbackInfoReturnable<Boolean> cir) { - if (SkyHanniMod.feature.chat.peekChat != Keyboard.KEY_NONE && Keyboard.isKeyDown(SkyHanniMod.feature.chat.peekChat)) + if (SkyHanniMod.feature.chat.peekChat > Keyboard.KEY_NONE + && Minecraft.getMinecraft().thePlayer != null + && Keyboard.isKeyDown(SkyHanniMod.feature.chat.peekChat)) cir.setReturnValue(true); } } |