aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/main/java/io/github/moulberry/notenoughupdates/overlays/AuctionSearchOverlay.java12
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()) {