diff options
| author | hannibal2 <24389977+hannibal002@users.noreply.github.com> | 2024-03-28 10:07:28 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-03-28 10:07:28 +0100 |
| commit | 07a41cc61d1aa4373e925d240e067d720580b486 (patch) | |
| tree | 185d8a6c4ccfe6e2811511f35c67d39aec129202 /src/main/java/at/hannibal2/skyhanni/features/stranded | |
| parent | 0beb9e3b3132bcc14c99759628732625ee97d6a8 (diff) | |
| download | skyhanni-07a41cc61d1aa4373e925d240e067d720580b486.tar.gz skyhanni-07a41cc61d1aa4373e925d240e067d720580b486.tar.bz2 skyhanni-07a41cc61d1aa4373e925d240e067d720580b486.zip | |
Improvement: Config Move (#1300)
Co-authored-by: hannibal2 <24389977+hannibal00212@users.noreply.github.com>
Diffstat (limited to 'src/main/java/at/hannibal2/skyhanni/features/stranded')
| -rw-r--r-- | src/main/java/at/hannibal2/skyhanni/features/stranded/HighlightPlaceableNpcs.kt | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/src/main/java/at/hannibal2/skyhanni/features/stranded/HighlightPlaceableNpcs.kt b/src/main/java/at/hannibal2/skyhanni/features/stranded/HighlightPlaceableNpcs.kt index 75cadeef5..0ce2d0cb5 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/stranded/HighlightPlaceableNpcs.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/stranded/HighlightPlaceableNpcs.kt @@ -1,6 +1,7 @@ package at.hannibal2.skyhanni.features.stranded import at.hannibal2.skyhanni.SkyHanniMod +import at.hannibal2.skyhanni.config.ConfigUpdaterMigrator import at.hannibal2.skyhanni.events.GuiContainerEvent import at.hannibal2.skyhanni.events.InventoryCloseEvent import at.hannibal2.skyhanni.events.InventoryFullyOpenedEvent @@ -16,7 +17,7 @@ import net.minecraftforge.fml.common.eventhandler.SubscribeEvent class HighlightPlaceableNpcs { - private val config get() = SkyHanniMod.feature.stranded + private val config get() = SkyHanniMod.feature.misc.stranded private val locationPattern by RepoPattern.pattern( "stranded.highlightplacement.location", @@ -59,6 +60,11 @@ class HighlightPlaceableNpcs { } } + @SubscribeEvent + fun onConfigFix(event: ConfigUpdaterMigrator.ConfigFixEvent) { + event.move(31, "stranded", "misc.stranded") + } + private fun isPlaceableNpc(lore: List<String>): Boolean { // Checking if NPC & placeable if (lore.isEmpty() || !(lore.last() == "§ethis NPC!" || lore.last() == "§eyour location!")) { |
