From fc71a87b8d5a04e9252fede85cacb1de4ac92612 Mon Sep 17 00:00:00 2001 From: Lulonaut <67191924+Lulonaut@users.noreply.github.com> Date: Sun, 26 Sep 2021 21:02:18 +0200 Subject: Java not rust --- .../notenoughupdates/overlays/AuctionSearchOverlay.java | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'src/main/java') diff --git a/src/main/java/io/github/moulberry/notenoughupdates/overlays/AuctionSearchOverlay.java b/src/main/java/io/github/moulberry/notenoughupdates/overlays/AuctionSearchOverlay.java index 8b3b21f0..dc31c686 100644 --- a/src/main/java/io/github/moulberry/notenoughupdates/overlays/AuctionSearchOverlay.java +++ b/src/main/java/io/github/moulberry/notenoughupdates/overlays/AuctionSearchOverlay.java @@ -334,17 +334,17 @@ public class AuctionSearchOverlay { } else if(Keyboard.getEventKey() == Keyboard.KEY_RETURN) { searchStringExtra = ""; close(); - } else if(Keyboard.getEventKey() == Keyboard.KEY_TAB){ + } else if(Keyboard.getEventKey() == Keyboard.KEY_TAB) { if (!autocompletedItems.isEmpty()) { - searchString = autocompletedItems.iterator().next(); + searchString = autocompletedItems.get(0); JsonObject repoObject = NotEnoughUpdates.INSTANCE.manager.getItemInformation().get(autocompletedItems.iterator().next()); - String displayname = repoObject.get("displayname").getAsString(); - if (displayname.contains("Enchanted Book")){ - String lore = repoObject.get("lore").getAsJsonArray().iterator().next().getAsString(); + String displayName = repoObject.get("displayname").getAsString(); + if (displayName.contains("Enchanted Book")){ + String lore = repoObject.get("lore").getAsJsonArray().get(0).getAsString(); String name = lore.substring(0, lore.lastIndexOf(" ")); searchString = Utils.cleanColour(name); } else { - searchString = Utils.cleanColour(displayname); + searchString = Utils.cleanColour(displayName); } } } else if(Keyboard.getEventKeyState()) { -- cgit