diff --git a/core/src/main/kotlin/com/willfp/libreforge/filters/Filters.kt b/core/src/main/kotlin/com/willfp/libreforge/filters/Filters.kt index 17c348a62..1157ba99d 100644 --- a/core/src/main/kotlin/com/willfp/libreforge/filters/Filters.kt +++ b/core/src/main/kotlin/com/willfp/libreforge/filters/Filters.kt @@ -41,16 +41,6 @@ object Filters : Registry>() { for (key in config.getKeys(false)) { val filter = get(key) ?: get(key.removePrefix("not_")) ?: continue - - if (filter.deprecationMessage != null) { - context.log( - ConfigWarning( - key, - "Filter $key is deprecated: ${filter.deprecationMessage}. It will be removed in the future." - ) - ) - } - blocks += makeBlock(filter, config, context) ?: continue } @@ -62,6 +52,15 @@ object Filters : Registry>() { config: Config, context: ViolationContext ): FilterBlock? { + if (filter.deprecationMessage != null) { + context.log( + ConfigWarning( + filter.id, + "Filter ${filter.id} is deprecated: ${filter.deprecationMessage}. It will be removed in the future." + ) + ) + } + if (!filter.checkConfig(config, context)) { return null } diff --git a/core/src/main/kotlin/com/willfp/libreforge/filters/impl/FilterOnlyBosses.kt b/core/src/main/kotlin/com/willfp/libreforge/filters/impl/FilterOnlyBosses.kt index dbf522f97..f40ea4ed2 100644 --- a/core/src/main/kotlin/com/willfp/libreforge/filters/impl/FilterOnlyBosses.kt +++ b/core/src/main/kotlin/com/willfp/libreforge/filters/impl/FilterOnlyBosses.kt @@ -9,7 +9,7 @@ import org.bukkit.entity.Boss import org.bukkit.entity.ElderGuardian import org.bukkit.persistence.PersistentDataType -@Deprecated("Use 'is_boss' filter instead") +@Deprecated("Use is_boss instead") object FilterOnlyBosses : Filter("only_bosses") { override fun getValue(config: Config, data: TriggerData?, key: String): Boolean { return config.getBool(key) diff --git a/core/src/main/kotlin/com/willfp/libreforge/filters/impl/FilterOnlyNonBosses.kt b/core/src/main/kotlin/com/willfp/libreforge/filters/impl/FilterOnlyNonBosses.kt index e6404ea13..575eb33b5 100644 --- a/core/src/main/kotlin/com/willfp/libreforge/filters/impl/FilterOnlyNonBosses.kt +++ b/core/src/main/kotlin/com/willfp/libreforge/filters/impl/FilterOnlyNonBosses.kt @@ -9,7 +9,7 @@ import org.bukkit.entity.Boss import org.bukkit.entity.ElderGuardian import org.bukkit.persistence.PersistentDataType -@Deprecated("Use 'is_boss' filter instead") +@Deprecated("Use is_boss instead") object FilterOnlyNonBosses : Filter("only_non_bosses") { override fun getValue(config: Config, data: TriggerData?, key: String): Boolean { return config.getBool(key)