Skip to content

feat: LPC 4.2.0 — Minecraft 26.2 / Adventure 5 / Veylor-Development#38

Merged
Ayont merged 2 commits into
masterfrom
update/lpc-2.0
Jul 1, 2026
Merged

feat: LPC 4.2.0 — Minecraft 26.2 / Adventure 5 / Veylor-Development#38
Ayont merged 2 commits into
masterfrom
update/lpc-2.0

Conversation

@Ayont

@Ayont Ayont commented Jul 1, 2026

Copy link
Copy Markdown
Owner

Summary

The 26.2 update. Builds, tests green, jar ships as LPC-4.2.0.jar.

Platform

  • Target Paper / Minecraft 26.2 (paper-api 26.2.build.40-alpha), api-version: 26.2
  • Migrate to Adventure 5.2.0 — the version Paper 26.2 bundles (verified against the paper-api POM). Paper 26.1 shipped Adventure 4.x, so this plugin now requires Paper 26.2+.
  • Fixes Unsupported class file major version 69 build failure: Gradle 8.14 cannot run on Java 25 (its bundled Groovy/ASM rejects Java 25 class files), so Gradle now runs on Java 21 and compiles via the Java 25 toolchain (auto-provisioned by the new foojay-resolver-convention in settings.gradle).

Dependency updates (folds in/supersedes the open Renovate PRs)

Adventure 5 migration

  • Production code only used ClickEvent.openUrl(...) / .clickEvent(...) — compatible as-is.
  • Test fix: ClickEvent is now generic; the URL lives on Payload.Text (((ClickEvent.Payload.Text) click.payload()).value()), not click.value().

CI

  • New .github/workflows/build.yml — runs clean build on every push/PR (there was no CI before).
  • publish.yml: Java 21 Gradle runtime + 25 toolchain, bumped action versions.

Branding & UX

  • Author Varilx-Development → Veylor-Development (the team behind Veylor.net, free plugins on Modrinth).
  • /lpc version now reports the detected platform + target (MC 26.2 · Java 25 · Adventure 5).
  • README: compatibility table + a clear "Unsupported API version" note for users on older servers (they need Paper 26.2 + Java 25), and a direct answer to "can players use MiniMessage in chat?".

Security (already in this branch — closes #22, #26)

  • Player messages are injected as a pre-resolved component with a random per-render tag, after PlaceholderAPI runs on the format — so %player_name% typed by a non-op is rendered literally, never expanded.
  • Player input uses a restricted MiniMessage parser (cosmetic tags only); interactive tags (click/hover/insertion) are always stripped.

Verification

./gradlew clean build → BUILD SUCCESSFUL, all tests pass (Gradle on JDK 21, toolchain 25).

Not done here

  • Gradle 9 (chore(deps): update gradle to v9 #17) is deferred — the build still uses a couple of features deprecated in Gradle 9, and Shadow needs verifying against Gradle 9. Left open.

…ment (4.2.0)

- Target Paper/Minecraft 26.2 (paper-api 26.2.build.40-alpha), api-version 26.2
- Migrate to Adventure 5.2.0 (bundled by Paper 26.2): fix ClickEvent payload access in tests
- Update deps: LuckPerms 5.5, PlaceholderAPI 2.12.2, Gson 2.14.0, JUnit 5.14.4, Gradle 8.14.5
- Fix CI: Gradle runs on Java 21 (toolchain 25 via foojay resolver) — Gradle 8.14 cannot run on Java 25
- Bump actions: setup-java v5, gradle/actions v6, checkout v5; add build.yml CI
- Rebrand author Varilx-Development -> Veylor-Development
- /lpc version now reports platform + target (MC 26.2 / Java 25 / Adventure 5)
…sertion exploits

Adds ComponentSanitizer that recursively strips clickEvent / hoverEvent / insertion
from a component tree. Applied to:
- PlayerMessages.render  -> the single place player text becomes a component
- ItemPlaceholder         -> anvil/3rd-party item names (Paper)

The restricted cosmetic parser already rejects interactive tags; this is a belt-
and-suspenders guarantee that no interactive event can ever reach chat, even via
nested children or a crafted item name. Cosmetic styling is preserved.

Covers the exploit reported on Discord (players typing <click:run_command:...>
that executes on click). Note: legacy/Spigot output is inherently safe because it
serializes to section-sign codes that cannot carry events.

Tests: 43 (7 new ComponentSanitizer tests + insertion case), 0 failures.
@Ayont Ayont merged commit 1889e89 into master Jul 1, 2026
1 check passed
@Ayont Ayont deleted the update/lpc-2.0 branch July 1, 2026 20:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Can't add %% placholder.

1 participant