aboutsummaryrefslogtreecommitdiff
path: root/src/main
diff options
context:
space:
mode:
authorjani270 <69345714+jani270@users.noreply.github.com>2023-12-26 10:25:42 +0100
committerGitHub <noreply@github.com>2023-12-26 10:25:42 +0100
commitda1bdcbff8f8137706bf16ca9eb5b747028c1d22 (patch)
tree9786ebcfb27cb5e7f69da82f1438c857b93450e5 /src/main
parent0267c885c1cd2787599fbdc41363a2f819794c18 (diff)
downloadNotEnoughUpdates-da1bdcbff8f8137706bf16ca9eb5b747028c1d22.tar.gz
NotEnoughUpdates-da1bdcbff8f8137706bf16ca9eb5b747028c1d22.tar.bz2
NotEnoughUpdates-da1bdcbff8f8137706bf16ca9eb5b747028c1d22.zip
Search AH/BZ key searches now pets only and fix ench book search (#978)
Diffstat (limited to 'src/main')
-rw-r--r--src/main/java/io/github/moulberry/notenoughupdates/NEUOverlay.java6
1 files changed, 3 insertions, 3 deletions
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(' '));