From da1bdcbff8f8137706bf16ca9eb5b747028c1d22 Mon Sep 17 00:00:00 2001 From: jani270 <69345714+jani270@users.noreply.github.com> Date: Tue, 26 Dec 2023 10:25:42 +0100 Subject: Search AH/BZ key searches now pets only and fix ench book search (#978) --- src/main/java/io/github/moulberry/notenoughupdates/NEUOverlay.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/main') diff --git a/src/main/java/io/github/moulberry/notenoughupdates/NEUOverlay.java b/src/main/java/io/github/moulberry/notenoughupdates/NEUOverlay.java index 4070169b..691515b4 100644 --- a/src/main/java/io/github/moulberry/notenoughupdates/NEUOverlay.java +++ b/src/main/java/io/github/moulberry/notenoughupdates/NEUOverlay.java @@ -1212,11 +1212,11 @@ public class NEUOverlay extends Gui { NotEnoughUpdates.INSTANCE.openGui = new GuiPriceGraph(internalname.get()); return true; } else if (keyPressed == NotEnoughUpdates.INSTANCE.config.misc.openAHKeybind) { - String displayname = item.get("displayname").getAsString(); + String displayName = item.get("displayname").getAsString(); - String cleanName = Utils.cleanColour(displayname).replace("[Lvl {LVL}]", "").trim(); + String cleanName = Utils.cleanColour(displayName).replace("[Lvl {LVL}]", "]").trim(); - if (displayname.equals("§fEnchanted Book")) { + if (displayName.endsWith("Enchanted Book")) { String loreName = Utils.cleanColour(item.getAsJsonArray("lore").get(0).getAsString()); String bookName = loreName.substring(0, loreName.lastIndexOf(' ')); -- cgit