You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
chore: drop Sponge7 support, bump to Java 17, extend CI to release/v7 (#40)
Realigns this repo with **BanManager v8.0.0-SNAPSHOT** on `master` after BanManager dropped its legacy Sponge API 7 (MC 1.12.2 / Java 8) module, then carries the WebEnhancer pin feature forward onto v8's MiniMessage-based message pipeline so the full E2E matrix passes against v8.
### Drop Sponge7 (mirrors BanManager v8)
- Remove `sponge-api7/` source module (build script, `SpongePlugin`, `SpongeCommand`, `SpongeMetrics`, `LogServerAppender`, `ReportListener`, bundled assets symlink).
- Remove `e2e/platforms/sponge7/` Docker compose + bundled configs.
- Drop `:BanManagerWebEnhancerSponge7` from `settings.gradle.kts`.
- Strip Sponge7 jar copy / test / debug tasks from `e2e/build.gradle.kts` and remove `"sponge7"` from the e2e `clean` platform list.
- Remove the `Sponge7-1.12.2` entry from the e2e workflow matrix.
### Bump baseline to Java 17
- `buildSrc/src/main/kotlin/CommonConfig.kt`: source/target compatibility 1.8 → 17 for non-Fabric modules.
- Sponge module already overrides to Java 21; Fabric uses its own toolchain; CI already provisions JDK 21 as default.
### Extend CI to `release/v7`
- `.github/workflows/build.yml` and `.github/workflows/e2e.yml` now trigger on push to `release/v7` (in addition to `master` / PRs / scheduled / dispatch).
### Migrate pin feature to BanManager v8 placeholder syntax
BanManager v8 rejects legacy `&`-code messages outright and uses MiniMessage `<token>` placeholders instead of `[token]`. Updates required so the WebEnhancer pin survives v8:
- `CommonPlayerDeniedListener.handlePin` now inspects `Message.getRawTemplate()` and looks for `<pin>` (not `[pin]` via `toString()`); skips early when the template is missing or doesn't contain the placeholder. Mirror the change in `CommonPlayerDeniedListenerTest` (mocks `getRawTemplate()`, adds null-template case).
- Rewrite the bundled `common/src/main/resources/messages.yml` (the WebEnhancer defaults) to MiniMessage with `<pin>`, `<expires>`, `<seconds>`.
- Rewrite every `e2e/platforms/*/configs/banmanager-webenhancer/messages.yml` fixture to match.
- Replace each `e2e/platforms/*/configs/banmanager/messages.yml` fixture with a minimal MiniMessage override – only the `ban` / `tempban` / `banip` / `tempbanip` `disallowed` + `kick` templates carry `<pin>`; everything else falls through to BanManager v8's bundled defaults so the override stays small.
### Fix nested kick-reason extraction in E2E helpers
MiniMessage renders nested-color templates (`<gold>A<dark_red>B<gold>C`) as nested chat components, and Paper 1.20.3+ / newer Fabric versions deliver disconnects as NBT compounds. The previous `extractNbtText` only walked top-level `extra[*].text`, which truncated the kick reason at the first nested segment and hid the `. Your appeal pin is <pin>` tail. Result: every Online Kick Pin Placeholder test failed except Fabric-1.20.1 (still on JSON disconnects).
- `extractNbtText` now recurses into each `extra[*]` list item.
- New `extractJsonText` helper applies the same recursion to JSON chat components, replacing the shallow `extra.map(e => e.text)` that had the same bug for nested JSON payloads (Velocity / Sponge login-denial kicks).
### CI
All 12 required checks green: Java 21 - mariadb, Java 21 - h2, plus E2E for Bukkit, Fabric-1.20.1 / 1.21.1 / 1.21.4 / 1.21.11, Sponge-1.20.6 / 1.21.1 / 1.21.3, Velocity, BungeeCord.
### Notes
- Replaces the closed PR #39 (CI-only); both fixes consolidated here so master goes green in one merge.
- WebEnhancer `release/v7` already shipped `v7.11.0` with Sponge7 support; this PR only changes `master`.
Copy file name to clipboardExpand all lines: common/src/test/java/me/confuser/banmanager/webenhancer/common/listeners/CommonPlayerDeniedListenerTest.java
0 commit comments