summaryrefslogtreecommitdiff
path: root/src/main/java/at/hannibal2/skyhanni/features/stranded
diff options
context:
space:
mode:
authorhannibal2 <24389977+hannibal002@users.noreply.github.com>2024-03-28 10:07:28 +0100
committerGitHub <noreply@github.com>2024-03-28 10:07:28 +0100
commit07a41cc61d1aa4373e925d240e067d720580b486 (patch)
tree185d8a6c4ccfe6e2811511f35c67d39aec129202 /src/main/java/at/hannibal2/skyhanni/features/stranded
parent0beb9e3b3132bcc14c99759628732625ee97d6a8 (diff)
downloadskyhanni-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.kt8
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!")) {