diff options
author | Phoebe <77941535+catgirlseraid@users.noreply.github.com> | 2024-05-17 00:50:59 +1200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-05-16 14:50:59 +0200 |
commit | 38778ba299c1126f81902d4ba872d922a6d08cc3 (patch) | |
tree | 5d67eff68a3926638ee4452196cd2df8490dcd92 | |
parent | 98b426bb2751d8e288c8823dc1504e0604dd1654 (diff) | |
download | NotEnoughUpdates-38778ba299c1126f81902d4ba872d922a6d08cc3.tar.gz NotEnoughUpdates-38778ba299c1126f81902d4ba872d922a6d08cc3.tar.bz2 NotEnoughUpdates-38778ba299c1126f81902d4ba872d922a6d08cc3.zip |
Fix pv text input accepting inputs when it shouldn't (#1168)
Co-authored-by: SeRaid <77941535+SeRaid743@users.noreply.github.com>
-rw-r--r-- | src/main/java/io/github/moulberry/notenoughupdates/profileviewer/GuiProfileViewer.java | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/main/java/io/github/moulberry/notenoughupdates/profileviewer/GuiProfileViewer.java b/src/main/java/io/github/moulberry/notenoughupdates/profileviewer/GuiProfileViewer.java index 6194b2dd..68a34d02 100644 --- a/src/main/java/io/github/moulberry/notenoughupdates/profileviewer/GuiProfileViewer.java +++ b/src/main/java/io/github/moulberry/notenoughupdates/profileviewer/GuiProfileViewer.java @@ -946,13 +946,14 @@ public class GuiProfileViewer extends GuiScreen { if (playerNameTextField.getFocus()) { if (keyCode == Keyboard.KEY_RETURN) { + String name = playerNameTextField.getText(); currentPage = ProfileViewerPage.LOADING; NotEnoughUpdates.profileViewer.loadPlayerByName( playerNameTextField.getText(), profile -> { //todo: invalid name if (profile != null) { profile.resetCache(); - ProfileViewerUtils.saveSearch(playerNameTextField.getText()); + ProfileViewerUtils.saveSearch(name); } Minecraft.getMinecraft().displayGuiScreen(new GuiProfileViewer(profile)); } |