diff --git a/CHANGELOG.md b/CHANGELOG.md index e6c1b12..aedfb47 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,10 @@ # Changelog +## 0.6.1 + +- `mask-for-viewers` no longer gets a warning at start-up saying it isn't a setting. 0.6.0 read and used it all along; only the list of known settings missed it. +- Tested: unit tests, including a check that the setting raises no warning. Not run on a live server. + ## 0.6.0 - **Adults' words masked for kids** (D233, D235). A new `mask-for-viewers` setting in `filter.yml`, off by default. With it on, a player with `mayor.filter.bypass` writes freely, and anyone without the bypass sees each blocked word as `****` in that player's chat and private messages, while players with the bypass see them as written. A player without the bypass counts as filtered, so one whose permissions aren't known yet is filtered too. diff --git a/build.gradle.kts b/build.gradle.kts index 7f86ac7..5366b0a 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -4,7 +4,7 @@ plugins { } group = "com.extantape" -version = "0.6.0" +version = "0.6.1" java { toolchain.languageVersion.set(JavaLanguageVersion.of(25)) diff --git a/src/main/java/com/extantape/mayor/config/SettingsLoader.java b/src/main/java/com/extantape/mayor/config/SettingsLoader.java index bd4748b..ad267f3 100644 --- a/src/main/java/com/extantape/mayor/config/SettingsLoader.java +++ b/src/main/java/com/extantape/mayor/config/SettingsLoader.java @@ -34,7 +34,7 @@ public final class SettingsLoader { private static final Set CONFIG_KEYS = Set.of("config-version", "circles", "circle-only-worlds", "world-groups", "dimension-suffixes", "private-message-commands", "reply-commands", "broadcast-commands", "blocked-commands", "nobody-heard", "messages"); - private static final Set FILTER_KEYS = Set.of("enabled", "check", "words", "allow"); + private static final Set FILTER_KEYS = Set.of("enabled", "check", "words", "allow", "mask-for-viewers"); /** The result: settings to apply, or errors explaining why there are none. Warnings either way. */ public record Result(Settings settings, List errors, List warnings) { diff --git a/src/test/java/com/extantape/mayor/config/SettingsLoaderTest.java b/src/test/java/com/extantape/mayor/config/SettingsLoaderTest.java index 25e21d6..d0088aa 100644 --- a/src/test/java/com/extantape/mayor/config/SettingsLoaderTest.java +++ b/src/test/java/com/extantape/mayor/config/SettingsLoaderTest.java @@ -81,5 +81,6 @@ void maskForViewersIsOffByDefaultAndReadFromFilterYml() { SettingsLoader.Result on = load(null, "words: [heck]\nmask-for-viewers: true\n", null); assertTrue(on.ok(), on.errors().toString()); assertTrue(on.settings().filtered().maskForViewers()); + assertTrue(on.warnings().isEmpty(), on.warnings().toString()); } }