aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/io/github/moulberry/notenoughupdates/commands/misc/AhCommand.java
diff options
context:
space:
mode:
authorhannibal2 <24389977+hannibal00212@users.noreply.github.com>2022-08-24 13:48:53 +0200
committerGitHub <noreply@github.com>2022-08-24 13:48:53 +0200
commitc3845685bbb3a2a7fde25476eed0f788e038dc93 (patch)
treef0569ff00274a3b419e3a5da3742baabce8622be /src/main/java/io/github/moulberry/notenoughupdates/commands/misc/AhCommand.java
parentb97dd13100f36dc64560067c707081af5bc8ff0c (diff)
downloadnotenoughupdates-c3845685bbb3a2a7fde25476eed0f788e038dc93.tar.gz
notenoughupdates-c3845685bbb3a2a7fde25476eed0f788e038dc93.tar.bz2
notenoughupdates-c3845685bbb3a2a7fde25476eed0f788e038dc93.zip
Neuah save search (#243)
* saving the last search in neuah * default enabled * saving jani's desk
Diffstat (limited to 'src/main/java/io/github/moulberry/notenoughupdates/commands/misc/AhCommand.java')
-rw-r--r--src/main/java/io/github/moulberry/notenoughupdates/commands/misc/AhCommand.java7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/main/java/io/github/moulberry/notenoughupdates/commands/misc/AhCommand.java b/src/main/java/io/github/moulberry/notenoughupdates/commands/misc/AhCommand.java
index 1cd6bcce..bd8abf1d 100644
--- a/src/main/java/io/github/moulberry/notenoughupdates/commands/misc/AhCommand.java
+++ b/src/main/java/io/github/moulberry/notenoughupdates/commands/misc/AhCommand.java
@@ -50,8 +50,13 @@ public class AhCommand extends ClientCommandBase {
NotEnoughUpdates.INSTANCE.manager.auctionManager.customAH.clearSearch();
NotEnoughUpdates.INSTANCE.manager.auctionManager.customAH.updateSearch();
- if (args.length > 0)
+ if (args.length > 0) {
NotEnoughUpdates.INSTANCE.manager.auctionManager.customAH.setSearch(StringUtils.join(args, " "));
+ } else {
+ if (NotEnoughUpdates.INSTANCE.config.neuAuctionHouse.saveLastSearch) {
+ NotEnoughUpdates.INSTANCE.manager.auctionManager.customAH.setSearch(null);
+ }
+ }
}
}
}