aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/at/hannibal2/skyhanni/config
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/java/at/hannibal2/skyhanni/config')
-rw-r--r--src/main/java/at/hannibal2/skyhanni/config/commands/Commands.kt8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/main/java/at/hannibal2/skyhanni/config/commands/Commands.kt b/src/main/java/at/hannibal2/skyhanni/config/commands/Commands.kt
index 054657602..d49ddf345 100644
--- a/src/main/java/at/hannibal2/skyhanni/config/commands/Commands.kt
+++ b/src/main/java/at/hannibal2/skyhanni/config/commands/Commands.kt
@@ -65,6 +65,7 @@ object Commands {
registerCommand("shcropstartlocation") { GardenStartLocation.setLocationCommand() }
registerCommand("shstopcityprojectreminder") { CityProjectFeatures.disable() }
registerCommand("shclearslayerprofits") { SlayerItemProfitTracker.clearProfitCommand(it) }
+ registerCommand("shclearfarmingitems") { clearFarmingItems() }
// for users - fix bugs
registerCommand("shupdaterepo") { SkyHanniMod.repo.updateRepo() }
@@ -109,6 +110,13 @@ object Commands {
}
}
+ private fun clearFarmingItems() {
+ val config = GardenAPI.config?.fortune ?: return
+ LorenzUtils.chat("§e[SkyHanni] clearing farming items")
+ config.farmingItems.clear()
+ config.outdatedItems.clear()
+ }
+
private fun registerCommand(name: String, function: (Array<String>) -> Unit) {
ClientCommandHandler.instance.registerCommand(SimpleCommand(name, createCommand(function)))
}