From 64fdc9baa8fa883828b9ff124b3a466da7c3532e Mon Sep 17 00:00:00 2001 From: Kam Date: Wed, 22 Jan 2025 12:14:04 -0500 Subject: [PATCH] Save when Pressing Escape on Console Command --- .../java/noppes/npcs/client/gui/SubGuiNpcCommand.java | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/main/java/noppes/npcs/client/gui/SubGuiNpcCommand.java b/src/main/java/noppes/npcs/client/gui/SubGuiNpcCommand.java index 9e6df6db5..0eaaaf595 100644 --- a/src/main/java/noppes/npcs/client/gui/SubGuiNpcCommand.java +++ b/src/main/java/noppes/npcs/client/gui/SubGuiNpcCommand.java @@ -41,11 +41,18 @@ public class SubGuiNpcCommand extends SubGuiInterface implements ITextfieldListe } } + @Override + public void close(){ + if(getTextField(4) != null){ + unFocused(getTextField(4)); + } + super.close(); + } + @Override public void unFocused(GuiNpcTextField textfield) { if(textfield.id == 4){ command = textfield.getText(); } } - }