Update to Spigot 1.21 + Java 21 and add unit tests#31
Merged
Conversation
- Update Spigot API from 1.20.1 to 1.21.4-R0.1-SNAPSHOT - Migrate CrucialAPI 2.2.0 to CrucialLib v3.0.0 (new package names) - Update Java compiler target from 14/16 to 21 - Fix PotionEffectType.DAMAGE_RESISTANCE → RESISTANCE for 1.21 API - Update plugin.yml api-version to 1.21 - Add JUnit 5 + MockBukkit test suite (107 tests) - Add GitHub Actions CI workflow (mvn -B verify on Java 21) - Add CLAUDE.md, ARCHITECTURE.md, CONTRIBUTING.md, RUNBOOK.md - Add DECISIONS/ directory documenting Spigot 1.21 and test suite decisions https://claude.ai/code/session_01GGzjtrCV2rjGAue63LD1Rg
Change ./target/ to target/ so the Maven build output directory is properly excluded from git tracking. https://claude.ai/code/session_01GGzjtrCV2rjGAue63LD1Rg
Adds actions/upload-artifact step so the plugin JAR can be downloaded from the workflow run and used for publishing. https://claude.ai/code/session_01GGzjtrCV2rjGAue63LD1Rg
- Update all version references (Java 21, Spigot 1.21, CrucialLib v3.0.0) - Fix config key paths to match actual code (addiction_effects, overdose_effects, disable_drug_set) - Update API docs with CrucialLib import paths - Add docs/drugs.md covering drug mechanics, consumption flow, addiction system, overdose, and crafting - Add docs/development.md covering building, testing, CI, project structure, and contributing https://claude.ai/code/session_01GGzjtrCV2rjGAue63LD1Rg
- Bump version from 0.7.6 to 0.8.0 across pom.xml, all docs, and CLAUDE.md - Replace verbose CI/CD section in docs/development.md with references to existing ci.yml and trigger-docs.yml workflows - Update claude.md API version to reflect Spigot 1.21+ requirement https://claude.ai/code/session_01GGzjtrCV2rjGAue63LD1Rg
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.
Summary
This PR updates MyTrip to support Spigot 1.21.4 and Java 21, migrates from CrucialAPI to CrucialLib v3.0.0, and establishes a unit test suite with CI/CD integration.
Key Changes
Spigot 1.21 & Java 21 Upgrade
api-versionin plugin.yml from 1.15 to 1.21PotionEffectType.DAMAGE_RESISTANCE→PotionEffectType.RESISTANCEinDrugToolEvents.javaCrucialAPI → CrucialLib Migration
io.github.chafficui.CrucialAPItoio.github.chafficui.CrucialLibCRUCIAL_API_VERSIONtoCRUCIAL_LIB_VERSIONand updated to "3.0.0"Crucial.javato reference CrucialLib in log messages and download URLs (now points to GitHub instead of SpigotMC)Unit Test Suite
ConfigStringsTest: Validates constants, UUIDs, permission formatsMathUtilsTest: Tests random number generation with edge casesAPICallerTest: Tests event registration/unregistration for all API event typesmaven-surefire-pluginfor test execution.github/workflows/ci.yml) that runs on push/PR to master/main branchesDocumentation
ARCHITECTURE.md: Comprehensive overview of plugin structure, data flow, and CrucialLib integration pointsCLAUDE.md: Project overview, dependencies, build instructions, and key classes referenceCONTRIBUTING.md: Development setup, testing requirements, code style guidelines, and PR checklistRUNBOOK.md: Release process, common troubleshooting, and emergency proceduresDECISIONS/001-spigot-1.21-update.md: Decision record for this upgradeDECISIONS/002-add-unit-tests.md: Decision record for test suite implementationMinor Fixes
.gitignoreto usetarget/instead of./target/Implementation Details
testand do not affect production JARhttps://claude.ai/code/session_01GGzjtrCV2rjGAue63LD1Rg