diff options
-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)); } |