From dcc0a269be6ab53099574d79dda92f1516dfa539 Mon Sep 17 00:00:00 2001 From: hannibal2 <24389977+hannibal00212@users.noreply.github.com> Date: Sun, 17 Sep 2023 08:57:23 +0200 Subject: migrate tab complete config into commands --- .../skyhanni/features/misc/tabcomplete/GetFromSacksTabComplete.kt | 2 +- .../skyhanni/features/misc/tabcomplete/PlayerTabComplete.kt | 8 +++++++- .../skyhanni/features/misc/tabcomplete/WarpTabComplete.kt | 2 +- 3 files changed, 9 insertions(+), 3 deletions(-) (limited to 'src/main/java/at/hannibal2/skyhanni/features') diff --git a/src/main/java/at/hannibal2/skyhanni/features/misc/tabcomplete/GetFromSacksTabComplete.kt b/src/main/java/at/hannibal2/skyhanni/features/misc/tabcomplete/GetFromSacksTabComplete.kt index b8e3f56ad..50d1724e5 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/misc/tabcomplete/GetFromSacksTabComplete.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/misc/tabcomplete/GetFromSacksTabComplete.kt @@ -9,7 +9,7 @@ import net.minecraft.network.play.client.C01PacketChatMessage import net.minecraftforge.fml.common.eventhandler.SubscribeEvent object GetFromSacksTabComplete { - private val config get() = SkyHanniMod.feature.misc.tabCompleteCommands + private val config get() = SkyHanniMod.feature.commands.tabComplete private var sackList = emptyList() private val commands = arrayOf("gfs", "getfromsacks") diff --git a/src/main/java/at/hannibal2/skyhanni/features/misc/tabcomplete/PlayerTabComplete.kt b/src/main/java/at/hannibal2/skyhanni/features/misc/tabcomplete/PlayerTabComplete.kt index 5bf74e44c..27430c5de 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/misc/tabcomplete/PlayerTabComplete.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/misc/tabcomplete/PlayerTabComplete.kt @@ -1,6 +1,7 @@ package at.hannibal2.skyhanni.features.misc.tabcomplete import at.hannibal2.skyhanni.SkyHanniMod +import at.hannibal2.skyhanni.config.ConfigUpdaterMigrator import at.hannibal2.skyhanni.data.FriendAPI import at.hannibal2.skyhanni.data.PartyAPI import at.hannibal2.skyhanni.events.RepositoryReloadEvent @@ -11,7 +12,7 @@ import net.minecraft.client.entity.EntityOtherPlayerMP import net.minecraftforge.fml.common.eventhandler.SubscribeEvent object PlayerTabComplete { - private val config get() = SkyHanniMod.feature.misc.tabCompleteCommands + private val config get() = SkyHanniMod.feature.commands.tabComplete private var vipVisitsJson: VipVisitsJson? = null @SubscribeEvent @@ -19,6 +20,11 @@ object PlayerTabComplete { vipVisitsJson = event.getConstant("VipVisits") } + @SubscribeEvent + fun onConfigFix(event: ConfigUpdaterMigrator.ConfigFixEvent) { + event.move(2, "misc.tabCompleteCommands", "commands.tabComplete") + } + enum class PlayerCategory { PARTY, FRIENDS, diff --git a/src/main/java/at/hannibal2/skyhanni/features/misc/tabcomplete/WarpTabComplete.kt b/src/main/java/at/hannibal2/skyhanni/features/misc/tabcomplete/WarpTabComplete.kt index cc948c86e..034ea12dc 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/misc/tabcomplete/WarpTabComplete.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/misc/tabcomplete/WarpTabComplete.kt @@ -7,7 +7,7 @@ import at.hannibal2.skyhanni.utils.jsonobjects.WarpsJson import net.minecraftforge.fml.common.eventhandler.SubscribeEvent object WarpTabComplete { - private val config get() = SkyHanniMod.feature.misc.tabCompleteCommands + private val config get() = SkyHanniMod.feature.commands.tabComplete private var warpsJson: WarpsJson? = null @SubscribeEvent -- cgit