Fix/mockbukkit#43
Open
ez-plugins wants to merge 25 commits into
Open
Conversation
- Add .github/workflows/release.yml: stable release workflow ported from EzRTP — triggers on vX.Y.Z tag push or workflow_dispatch, stamps POM version, builds JAR, extracts CHANGELOG.md section, creates GitHub Release, publishes to Modrinth (id: ezafk, dep: vaultunlocked instead of vault which is not on Modrinth), and posts a Discord embed. - Add CHANGELOG.md: Keep a Changelog format with [Unreleased] stub and initial 3.0.0 entry. - ci.yml: add spigot-smoke-test (Spigot 1.21.4 via BuildTools, cached), paper-smoke-test (latest Paper via PaperMC API), and folia-smoke-test (latest Folia via PaperMC API) — all run after unit/feature tests and use -Dmaven.test.skip=true to avoid the MockBukkit local-install step. - plugin.yml: lower api-version from Paper-specific 26.1 to standard 1.21 so Spigot, Purpur, and Folia recognise the plugin without an unsupported-api-version warning.
The branch dev/26.1.1 does not exist. MockBukkit's version when built
outside its own CI is dev-{git short hash}, so we must pin to commit
d245e0a which matches <mockbukkit.version>dev-d245e0a</mockbukkit.version>
in pom.xml. Use --filter=blob:none --no-checkout for a fast partial
clone then check out the exact commit.
Also update README badges: Maven Publish → Modrinth version,
GitHub downloads → Modrinth downloads.
- Use --depth=1 --branch minecraft/v26 (the branch that actually exists)
- Capture short hash into MOCKBUKKIT_VERSION via GITHUB_ENV
- Pass -Dmockbukkit.version to mvn so it matches what Gradle published
(MockBukkit publishes dev-{shortHash} outside its own CI)
- Update pom.xml pin from dev-d245e0a to dev-6d384d3 (current HEAD)
MockBukkit minecraft/v26 gradle.properties has paper.api.version=26.1.2, so publishToMavenLocal publishes org.mockbukkit.mockbukkit:mockbukkit-v26.1.2. The previous artifactId mockbukkit-v26.1 didn't match, causing Maven to search remote repos and fail.
- paper.version: 26.1.2.build.7-alpha → 26.1.2.build.57-stable Matches MockBukkit minecraft/v26 gradle.properties (paper.api.full-version =26.1.2.build.57-stable). The older alpha build was missing RegistryKey.POINT_OF_INTEREST_TYPE, causing all tests to fail with NoClassDefFound on org.bukkit.Registry. - maven.compiler.release: 25 → 21 MC 1.21.x servers require Java 21 minimum; Java 21 is sufficient for all language features used (records, switch expressions, arrow cases). Targeting Java 21 bytecode maximises server compatibility.
MC 1.21.x requires Java 21 on the server, but targeting Java 17 bytecode means the JAR can run on any JVM >= 17, future-proofing against builds and tools that repackage with older toolchains. All language features used (records, switch expressions, arrow cases) are available since Java 16/17 — no Java 18-21 features are in use. Note: paper-api is kept as the compile dependency (Bukkit/Spigot compatible at runtime because zero io.papermc.* classes are imported directly; all Paper-specific paths are guarded by Class.forName reflection). Switching to spigot-api as compile dep would cause test classpath conflicts with MockBukkit's transitive paper-api dependency.
Paper: 1.21, 1.21.1, 1.21.4, 1.21.8, 1.21.11 × Java 21 & 25 (10 jobs) Folia: 1.21.4, 1.21.8, 1.21.11 × Java 21 & 25 ( 6 jobs) Spigot: 1.21.4 (via BuildTools) × Java 21 & 25 ( 2 jobs) Total: 18 smoke-test jobs, up from 3. Changes: - All three jobs now use strategy.fail-fast:false matrix - java-version uses matrix.java instead of hardcoded 25 - Paper/Folia resolve the latest build for the specific matrix mc_version (no longer resolves the 'latest' version dynamically — version is explicit) - Artifact names include mc_version + java for unique identification - Spigot cache key is shared across java matrix values (same JAR)
- Replace List.getFirst() (Java 21) with get(0) in AfkTimeManagerTest —
getFirst() was added in Java 21 via SequencedCollection; our compile
target is Java 17, so it fails test-compilation on Java 17 JDK.
- Simplify smoke test matrix from 18 jobs to 9:
Spigot 1.21.4 × Java [17, 21, 25] (3 jobs)
Paper 1.21.11 × Java [17, 21, 25] (3 jobs)
Folia 1.21.11 × Java [17, 21, 25] (3 jobs)
Each job builds the plugin JAR with matrix.java; when matrix.java < 21
a second setup-java step upgrades to Java 21 before starting the
server (MC 1.21.x requires Java 21 at runtime).
- game-versions: >=1.21 <=1.21.11 — pins the upper bound to the latest smoke-tested MC version; combined with game-versions-filter: release this tags the Modrinth release with all release MCs in that range. Update the cap when newer MC versions are smoke-tested. - actions/checkout@v6 does not exist; corrected to v5.
- plugin.yml api-version: 1.21 -> 1.19 — allows 1.19/1.20.x servers to load the plugin. CompatibilityUtil already handles all API differences: InventoryView class vs interface (<=1.20.6 / 1.21+), Adventure API (Paper 1.18+ with String fallback), legacy material names. Java 17 sets the hard floor; MC requires Java 17 from 1.18 onward. - release.yml game-versions: >=1.21 -> >=1.19 to match.
paper-api 26.1.2.build.57-stable is compiled with Java 25 (class file version 69). javac 17 can only read up to version 61, so any smoke-test job that uses JDK 17 to run 'mvn package' fails at compile time: bad class file: paper-api-...jar(JavaPlugin.class) class file has wrong version 69.0, should be 61.0 The plugin JAR targets Java 17 bytecode via maven.compiler.release=17, so runtime compatibility with Java 17+ servers is already guaranteed by the compiler flag — a Java 17 smoke-test job adds no coverage. MC 1.21.x also requires Java 21+ to start the server, making a Java 17 server runtime impossible for 1.21.x builds. Changes: - matrix: [17, 21, 25] -> [21, 25] on all three smoke jobs (6 jobs total) - Remove the 'Set up server JDK 21 if matrix.java < 21' conditional step
- New paper-legacy-smoke-test job: builds with JDK 25 (required for paper-api 26.x), then swaps to JDK 17 for server startup — verifying genuine Java 17 runtime compatibility. MC 1.20.4 is the last version that accepts Java 17; 1.20.5+ requires 21. - Updated smoke-test comment block to explain both modern and legacy jobs. - PlayerActivityListener: add @SuppressWarnings("deprecation") on onPlayerChat; AsyncPlayerChatEvent is deprecated in Paper 1.19+ but still fires on all supported versions (1.19–1.21.x).
…g defaults config.yml: - afk.sound.enabled / unafk.sound.enabled: true → false (requires Simple Voice Chat plugin; the guard already exists in code, but false is the safer and less confusing default for servers without SVC) - Add inline comments: bubble-column requires MC 1.13+, animation cherry leaves particle silently skipped on MC < 1.20, hide-screen notes MC 1.13+ docs/getting-started.md: - Fix wrong requirements: 1.26+/Java 25 → 1.19+/Java 17 - Add a "Server version compatibility" table covering every feature that has a minimum MC version or optional plugin dependency docs/configuration.md: - Add MC version notes for animation.enabled (cherry leaves 1.20+), anti.bubble-column (1.13+), sound.enabled (requires SVC plugin), kick section (PlayerKickEvent.Cause requires 1.19.2+) docs/features/afk-detection.md: - Add "Version compatibility" table for animation particle and SVC sound docs/features/anti-bypass.md: - Add note that bubble-column requires MC 1.13+ (always met on 1.19+) docs/features/afk-kick.md: - Add note that PlayerKickEvent.Cause requires 1.19.2+; falls back on 1.19.0-1.19.1
- CI: remove Java 21 from Paper/Folia smoke matrices (paper-api 26.x requires JDK 25 to compile against); Spigot 1.21.4 now builds the plugin JAR with JDK 25 then swaps to JDK 21 for BuildTools + server (BuildTools rejects Java 25 for 1.21.4, javaVersions [65,68]) - pom.xml: lower voicechat-api 2.6.0 -> 2.2.5 (oldest version where VoicechatPlugin.initialize is optional; covers SVC 2.2.5 through latest 2.6.x at runtime) - pom.xml: move MockBukkit to with-mockbukkit profile (auto-activates when -Dmockbukkit.version=... is passed); add maven.test.skip=true default so plain mvn package/test never tries to compile MockBukkit-dependent test sources without the profile active - CHANGELOG.md: add [3.0.1] entry with Modrinth link - docs/index.md: switch badges to Modrinth version/downloads
- Lower maven.compiler.release 17 → 11 for broader MC server compatibility - Convert Java 16+ syntax: records → final classes (AfkStatusDetails, LeaderboardEntry, LegacySerializer), pattern-matching instanceof → casts, switch expressions → traditional switch, Stream.toList() → Collectors.toList() - Delete CompatibilityUtil; split into focused compat helpers: InventoryCompat, HeadCompat, ItemMetaCompat, MaterialCompat, PlayerDisplayCompat, PlayerKickCompat, SoundCompat - Bundle/shade all 6 kyori Adventure artifacts (api, key, text, serializer-gson, serializer-legacy, text-minimessage) at 4.26.1; works on both Paper and Spigot without depending on the server's Adventure version - Rewrite LoreUtil to use bundled MiniMessage via reflection; fix & colour code double-processing and deserialize() signature change in 4.26.x - Add EzCountdown integration (EzCountdownIntegration.java): optional kick-warning countdown display via EzCountdown; supports TITLE, ACTION_BAR, BOSS_BAR, SCOREBOARD, DIALOG display types - Upgrade EzCountdown dependency 1.4.3 → 2.0.0; migrate integration from PermissionAttachment visibility trick to Notification.builder().players() - Fix plugin.yml: EzCountdown entry incorrectly appended to WorldEdit line - Add Surefire argLine -Dnet.bytebuddy.experimental=true for Java 25 ByteBuddy - Add smoke tests: LoreUtilSmokeTest (13), AfkStatusDetailsSmokeTest (7) - All 113 tests passing
- plugin.yml: add folia-supported: true so Folia servers load the plugin - Jaloquent 1.3.2 is compiled for Java 11 (class file 55), fixing the UnsupportedClassVersionError (69.0) on Spigot / Java 21 servers - Jaker + jaker-data-en-US bumped to 1.0.6 (test scope)
- Add SchedulerAdapter interface with runTaskTimer, runTaskTimerAsync, runTaskAsync, runTaskLater methods - Add BukkitSchedulerAdapter (standard Bukkit/Paper/Spigot) - Add FoliaSchedulerAdapter (uses GlobalRegionScheduler + AsyncScheduler) - Add SchedulerAdapterFactory (auto-detects Folia via PlatformDetector) - Add PlatformDetector.isFolia() and TaskHandle interface - Wire SchedulerAdapter into Registry; replace all direct Bukkit scheduler calls in TaskManager, AfkTimeManager, PlayerDisplayCompat, UpdateChecker, TabIntegration - Fix Registry.reset() called from onDisable() so each test lifecycle gets a fresh Registry bound to the current MockBukkit ServerMock - Fix SpigotIntegration consumer lambda to capture plugin/logger/version before going async, avoiding Registry.get() call after teardown - All 113 tests pass
…error grep - paper-legacy-smoke-test: add 'Rebuild EzFramework libs (Java 11 target)' step before plugin build so JavaQueryBuilder 1.2.0 and Jaloquent 1.3.2 are shaded as class file version 55 instead of JitPack's version 65 (Java 21). Java 17 servers reject class file versions above 61, causing UnsupportedClassVersionError on startup. - All four smoke-test assert steps: replace '-qiE ...Error.*EzAfk' with '-qE ...(SEVERE|ERROR).*EzAfk'. The old case-insensitive 'Error.*EzAfk' pattern matched Spigot 1.21.4's bundler output 'Unpacking error_prone_annotations-2.28.0.jar ... to /EzAfk/EzAfk/smoke-server/' which is a false positive. The new pattern requires uppercase ERROR or SEVERE which only appears in actual Minecraft log entries, not in file-path output.
- pom.xml: maven.compiler.release 11 → 21 - ci.yml: remove paper-legacy-smoke-test job (Paper 1.20.4 / Java 17); update comment block to reflect Java 21+ requirement - docs/getting-started.md: minimum requirement 1.19/Java 17 → 1.21+/Java 21+; remove Java 17 vs 21 runtime note; fix InventoryView table entry - README.md: add Requirements line (1.21+ / Java 21+) - bbcode-topic.md: fix badges and text (Minecraft 26.1 → 1.21+, Java 25 → 21+, version badge 3.0.0 → 3.0.1) - topics/modrinth-topic.md: fix version callout (26.1+/Java 25 → 1.21+/Java 21+, v3.0.0 → v3.0.1) - topics/bbcode.txt: fix MC range (1.7–1.21.* → 1.21+), Java 21+, version badge 2.0.0 → 3.0.1 - CHANGELOG.md: document Java 21 requirement, MC 1.21+ minimum, legacy CI removal
- Bypass whitelist and blacklist (bypass-lists.yml, BypassListManager, BypassList); /afk bypass whitelist|blacklist <add|remove|list> [player] - AFK zone entry/exit messages (afkzone.enter / afkzone.exit in messages.yml) - AFK zone reward countdowns via EzCountdown integration - Global zone reward defaults block in zones.yml - Session reward stats per player per zone (PlaceholderAPI placeholders) - Configurable kick-warning display types (CHAT, TITLE, ACTION_BAR, BOSS_BAR) - Java 21 required; minimum MC version raised to 1.21 - Docs, README, and listings updated for 3.1.0 - Version bumped to 3.1.0 in pom.xml
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.