Developer guide
Prerequisites
| Tool | Version |
|---|---|
| JDK | 25 (--enable-preview) |
| Maven | 3.9+ (or use ./mvnw) |
Building
./mvnw clean package
The shaded JAR is written to target/ezclean-<version>.jar.
Running tests
./mvnw test
Tests use JUnit 5 and Mockito. No running server is required.
Resource YAML validation is also part of the test suite (ResourceYamlValidationUnitTest).
Code style
Checkstyle is configured in checkstyle.xml (run by CI). Key rules:
- No wildcard (
*) imports - Standard Java naming conventions
- Braces required for all blocks
- No trailing whitespace
Run locally with:
./mvnw checkstyle:check
Project structure
src/main/java/com/skyblockexp/ezclean/
├── Bootstrap.java Plugin lifecycle (onEnable / onDisable)
├── EzCleanPlugin.java Main plugin class
├── Registry.java Static service locator
├── command/ All /ezclean subcommands
├── config/ CleanupSettings, ConfigurationLoader
├── integration/ Soft-depend shims (WorldGuard, Vault)
├── manager/ DeathChestManager
├── model/ DTOs (DeathChest, DeathChestSettings)
├── scheduler/ EntityCleanupScheduler, RemovalEvaluator
├── service/ BroadcastService
├── stats/ CleanupStatsTracker, UsageSnapshot
├── update/ SpigotUpdateChecker
└── util/ EntityPileDetector
Adding a new cleaner feature (checklist)
- Add the YAML key to
cleaners/default.ymlwith a comment and a safe default. - Add a
private final booleanfield and getter inCleanupSettings. - Read the key in
CleanupSettings.loadFromSection()viasection.getBoolean(..., default). - Wire the feature in
EntityCleanupScheduleror wherever it applies. - Register the toggle key in
ToggleSubcommand.featureToConfigKey(). - Document the key in configuration.md.
- Add a test in
ResourceYamlValidationUnitTestor create a new unit test.
Configuration migration
Config migration logic lives in EzCleanConfigurationLoader. When bumping the config schema:
- Add a new migration step inside the loader.
- Keep old keys readable so upgrades do not wipe existing values.
- Bump the schema version constant so the loader triggers the migration exactly once.
Pull requests
See CONTRIBUTING.md for the full contribution guide. In summary:
- Target the
mainbranch. - Include tests for new logic.
- Run
./mvnw test checkstyle:checkbefore opening a PR.