diff options
author | Lulonaut <67191924+Lulonaut@users.noreply.github.com> | 2021-09-26 21:02:18 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-09-26 21:02:18 +0200 |
commit | fc71a87b8d5a04e9252fede85cacb1de4ac92612 (patch) | |
tree | 593d26440e40a7c719d891210ba4515553e9594b /src/main/java | |
parent | 818dc8f0d7711a4036d83db1304f7f776ce47f39 (diff) | |
download | NotEnoughUpdates-fc71a87b8d5a04e9252fede85cacb1de4ac92612.tar.gz NotEnoughUpdates-fc71a87b8d5a04e9252fede85cacb1de4ac92612.tar.bz2 NotEnoughUpdates-fc71a87b8d5a04e9252fede85cacb1de4ac92612.zip |
Java not rust
Diffstat (limited to 'src/main/java')
-rw-r--r-- | src/main/java/io/github/moulberry/notenoughupdates/overlays/AuctionSearchOverlay.java | 12 |
1 files changed, 6 insertions, 6 deletions
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()) { |