Skip to content

Updates Migration

KOKOTO-DEV edited this page Aug 26, 2026 · 3 revisions

Updates Migration

KOKOTO WebChat 5.0.0 · Minecraft 1.18–26.2 · Java 17 baseline

4. Configuration Upgrade and Migration Fragment

KOKOTO WebChat preserves existing configured values by rebuilding an active-migration config from the current bundled config.yml and overlaying those values. Old comments/order/whitespace/indentation are discarded; current bundled comments and layout are authoritative.

The complete current reference is always written as:

plugins/KOKOTO-WebChat/config-reference-5.0.0.yml

It is an exact administrator-readable copy of the bundled config.yml, including comments and canonical double-quoted string scalars. It is not the migration template. /kchat reload validates YAML before any live service is stopped; invalid YAML leaves the previous running configuration active.

When config-version is missing or differs from the running plugin version, KWC performs one migration pass on the real config.yml:

  • The current bundled config.yml is copied as a fresh template.
  • Existing configured values are overlaid onto that template; removed settings are not copied back.
  • Old comments, ordering, whitespace, indentation, and duplicate textual copies are not carried forward.
  • If the old version marker is not *_auto_migration, the original config.yml is backed up before a real version upgrade.
  • Existing defaults that changed in the new version are not silently replaced; they stay review items.
  • The real file is marked config-version: "5.0.0_auto_migration".

KWC then writes:

plugins/KOKOTO-WebChat/config-migration-5.0.0.yml

This is a review report, not a copy/paste file for missing settings. It records the automatic insertion count, changed defaults that still need an operator decision, the exact final confirmation marker, and a comment-only current-vs-reference text diff. Because missing settings and their bundled comments are already inserted into the real config, they no longer appear as a large reference-only block at the top of the diff.

Decision rules:

Physical config.yml state Behavior
config-version missing or older/different Perform the migration, write 5.0.0_auto_migration, and generate/update the migration report
config-version: "5.0.0_auto_migration" Automatic migration enabled; rebuild from the latest same-version bundled config.yml, overlay current values, and refresh the migration report/diff
config-version: "5.0.0" Automatic migration disabled for the current version; skip same-version migration/backfill and remove stale same-version migration guidance

The marker controls migration behavior rather than review status:

# Keep same-version automatic migration enabled, even after you have reviewed the config
config-version: "5.0.0_auto_migration"

# Disable same-version automatic migration
config-version: "5.0.0"

A later real plugin-version upgrade enters the new version's _auto_migration state again.

5.0.0 upgrade

5.0.0 completes the KOKOTO WebChat identity transition and modular split. The repository uses kwc-core, kwc-standalone-frontend, kwc-adapter-bluemap, and kwc-platform-bukkit; existing BlueMapWebChat 4.x data/config are imported by the legacy migration layer, while Relay Protocol v1 keeps its X-BMWC-Relay-* wire headers for peer compatibility.

/kchat reload validates YAML before stopping live services. Invalid YAML, tab/full-width-space indentation, or invalid message-tokens.custom structure rejects the reload and keeps the previous running config and UI language.

5.0.0 contains the current KWC configuration surface, including the content-filter and Web Admin live-safe settings introduced during 5.0.0 development. On an actual version migration, KWC backs up a fixed older-version config, rebuilds from the current bundled config.yml, overlays the existing values, and marks the migrated file 5.0.0_auto_migration. Exact 5.0.0 is the fixed same-version state; 5.0.0_auto_migration keeps bundled-default reconstruction enabled on startup/reload.

Bundled UTF-8 starter filter lists under filter-lists/ are initialized once whenever .kwc-defaults-initialized is absent, including on a data directory that predates the feature. Existing or disabled list files are preserved, and starter lists deleted after initialization are not recreated.

After review, use:

config-version: "5.0.0"

The complete reference is config-reference-5.0.0.yml. It is an administrator-readable exact copy of the bundled default config.yml and is not used as migration input. config-migration-5.0.0.yml is regenerated from the current state on every startup/reload while _auto_migration remains enabled, so stale detected-version text is not retained. Its Difference section compares effective YAML values by setting path; comments, blank lines, indentation, quoting style, and line-position shifts are ignored. Only configured values that differ from the bundled default (plus operator/custom settings absent from the default) are shown. _auto_migration is not a review-state marker and may remain enabled after review.

4.7.0 upgrade

4.7.0 expands the conservative Bukkit/Spigot compatibility baseline to Minecraft 1.18, adds administrator custom-emoji multi-file upload, and adds configurable colon-delimited message tokens.

Compatibility

  • Conservative supported Minecraft range: 1.18 through 26.2
  • Java requirement: Java 17
  • plugin.yml: api-version: '1.18'
  • Maven compile API: spigot-api:1.18.2-R0.1-SNAPSHOT
  • Paper AsyncChatEvent remains reflection-detected; Bukkit AsyncPlayerChatEvent remains the hard-linked fallback.
  • Minecraft 1.17 and older are not claimed by this release.

Custom emoji multi-upload

Emoji upload now follows the same picker flow as normal chat file upload. The visible Upload button opens a hidden multi-file input. As soon as the picker returns a selection, KOKOTO WebChat copies the selected files, clears the native input, and immediately starts sequential uploads. There is no second Upload confirmation step and no file-picker focus/visibility workaround. Progress and active-transfer cancel remain available. The existing server endpoint still performs per-file validation, storage accounting, unique-name allocation, audit logging, and PNG-sidecar generation.

Message tokens

The default aliases are English-only and can be replaced or extended in any language. :enter:, :newline:, :nextline:, :linebreak:, and :br: insert a newline; :blankline:, :emptyline:, and :paragraphbreak: insert an empty line; :tab: and :indent: insert configurable spaces. Printable custom substitutions such as :separator: are also configurable. Unknown tokens are left unchanged so custom/image emoji tokens continue to work.

Configuration

4.7.0 adds the message-tokens section. Existing setting defaults outside this new section are unchanged. The review marker changes to:

config-version: "4.7.0"

A reviewed 4.6.3 configuration therefore receives the new message-tokens section plus the 4.7.0 review marker in config-migration-4.7.0.yml. Older and unversioned configs are also compared against the current defaults rather than being restricted to a 4.6.3-only upgrade path. Use config-reference-4.7.0.yml when you need the complete current configuration and comments. Empty maps such as message-tokens.custom: {} are retained as real missing settings.

5.0.0 project listing transition

5.0.0 is the bridge release from BlueMapWebChat to KOKOTO WebChat. Publish it on the existing BMWC listing first so 4.7.0 update checks can see the version. KWC 5.0.0 itself uses a new-project-first / legacy-project-fallback Modrinth lookup.

Legacy transition addresses: https://modrinth.com/plugin/bluemapwebchat, https://www.curseforge.com/minecraft/bukkit-plugins/bluemapwebchat, https://github.com/KOKOTO-DEV/BlueMapWebChat. Target canonical names after activation: https://modrinth.com/plugin/kokoto-webchat, https://www.curseforge.com/minecraft/bukkit-plugins/kokoto-webchat, https://github.com/KOKOTO-DEV/KOKOTO-WebChat. If seamless rename is unavailable, keep the BMWC listing as a retirement/migration page rather than deleting it.

Clone this wiki locally