diff options
author | hannibal2 <24389977+hannibal002@users.noreply.github.com> | 2023-05-31 13:06:27 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-05-31 13:06:27 +0200 |
commit | 744e7692843c65049e45f666973e1e37adcc7e9a (patch) | |
tree | ba31e4ff5a685f74455102209e1b127ed520cc9f /src/main/kotlin | |
parent | b40c37b653ba43d9603c578c440092c9f464935f (diff) | |
download | NotEnoughUpdates-744e7692843c65049e45f666973e1e37adcc7e9a.tar.gz NotEnoughUpdates-744e7692843c65049e45f666973e1e37adcc7e9a.tar.bz2 NotEnoughUpdates-744e7692843c65049e45f666973e1e37adcc7e9a.zip |
Removing the neu AH (#627)
* Removed the neu ah.
* make compile
* make command say its removed
* just what i wanted, an empty file
---------
Co-authored-by: hannibal2 <24389977+hannibal00212@users.noreply.github.com>
Co-authored-by: nopo <nopotheemail@gmail.com>
Diffstat (limited to 'src/main/kotlin')
-rw-r--r-- | src/main/kotlin/io/github/moulberry/notenoughupdates/commands/misc/AhCommand.kt | 36 |
1 files changed, 4 insertions, 32 deletions
diff --git a/src/main/kotlin/io/github/moulberry/notenoughupdates/commands/misc/AhCommand.kt b/src/main/kotlin/io/github/moulberry/notenoughupdates/commands/misc/AhCommand.kt index c7d80487..c3765147 100644 --- a/src/main/kotlin/io/github/moulberry/notenoughupdates/commands/misc/AhCommand.kt +++ b/src/main/kotlin/io/github/moulberry/notenoughupdates/commands/misc/AhCommand.kt @@ -19,49 +19,21 @@ package io.github.moulberry.notenoughupdates.commands.misc -import io.github.moulberry.notenoughupdates.NotEnoughUpdates -import io.github.moulberry.notenoughupdates.auction.CustomAHGui import io.github.moulberry.notenoughupdates.autosubscribe.NEUAutoSubscribe import io.github.moulberry.notenoughupdates.events.RegisterBrigadierCommandEvent -import io.github.moulberry.notenoughupdates.util.Utils -import io.github.moulberry.notenoughupdates.util.brigadier.RestArgumentType -import io.github.moulberry.notenoughupdates.util.brigadier.get import io.github.moulberry.notenoughupdates.util.brigadier.reply -import io.github.moulberry.notenoughupdates.util.brigadier.thenArgumentExecute +import io.github.moulberry.notenoughupdates.util.brigadier.thenExecute import net.minecraft.util.EnumChatFormatting.RED import net.minecraftforge.fml.common.eventhandler.SubscribeEvent -import java.util.function.Predicate @NEUAutoSubscribe class AhCommand { @SubscribeEvent fun onCommands(event: RegisterBrigadierCommandEvent) { - val hook = event.command("neuah") { - - thenArgumentExecute("search", RestArgumentType) { search -> - if (NotEnoughUpdates.INSTANCE.config.apiData.apiKey == null || - NotEnoughUpdates.INSTANCE.config.apiData.apiKey.isBlank() - ) { - reply("${RED}Can't open NEU AH: an api key is not set. Run /api new and put the result in settings.") - return@thenArgumentExecute - } - NotEnoughUpdates.INSTANCE.openGui = CustomAHGui() - NotEnoughUpdates.INSTANCE.manager.auctionManager.customAH.lastOpen = System.currentTimeMillis() - NotEnoughUpdates.INSTANCE.manager.auctionManager.customAH.clearSearch() - NotEnoughUpdates.INSTANCE.manager.auctionManager.customAH.updateSearch() - - val search = this[search] - - NotEnoughUpdates.INSTANCE.manager.auctionManager.customAH.setSearch( - if (search.isBlank() && NotEnoughUpdates.INSTANCE.config.neuAuctionHouse.saveLastSearch) - null else search - ) + event.command("neuah") { + thenExecute { -> + reply("${RED}NeuAH has been removed from NEU.") } } - hook.beforeCommand = Predicate { - if (!NotEnoughUpdates.INSTANCE.hasSkyblockScoreboard()) - Utils.addChatMessage("${RED}You must be on SkyBlock to use this feature.") - NotEnoughUpdates.INSTANCE.hasSkyblockScoreboard() - } } } |