4.0.0
π¦ Changelog β Version 4.0.0
This version introduces a full modular refactor, enabling multi-platform support and significantly improving flexibility, scalability, and maintainability of the API.
π¨ Major Changes
π§± Modular Platform Architecture
-
The codebase has been restructured into multiple modules:
core: platform-agnostic logic (commands, arguments, permissions, etc.)platform-spigot: implementation for Spigot/Bukkitplatform-velocity: initial implementation for Velocity support
-
The new structure allows platform-specific adapters to be plugged into the same command core engine.
π New CommandPlatform Abstraction
- Introduced
CommandPlatform<T, S>interface to isolate platform-specific behavior (e.g. permissions, sender types). - Makes the core engine reusable for other platforms such as Fabric or BungeeCord.
βοΈ CommandManager is now fully generic
- Signature changed to
CommandManager<T, S>for better type safety and separation between plugin and sender. - Requires platform adapters to inject the plugin and sender types explicitly.
π¦ Platform-specific artifacts
-
Each platform has its own artifact:
com.github.Traqueur-dev.CommandsAPI:platform-<platform>:4.0.0e.g.
platform-spigot,platform-velocity
β¨ New Features
π Usage Message Auto-Generation
- If no usage is explicitly defined, a usage string is generated dynamically based on the command's structure and sender permissions.
π§ Multi-Platform Ready
- Developers can now implement their own adapters to support new environments.
- Velocity support is scaffolded and can be extended using the core system.
π Bug Fixes
β In-Game Only Enforcement
- Improved player-only command handling.
- Commands can now reliably prevent execution from the console using in-game checks.
π§Ή General Improvements
- Cleaner separation of concerns: core vs. platform logic
- Improved internal logging via injected
Logger - Better extensibility and type safety
- Codebase modernization (Java 21 features, stricter nullability, etc.)
- Tab-completion and argument parsing have been made more robust and flexible
β οΈ Migration Guide
This update is not backward compatible with v3.x.
You must:
-
Replace your dependency with:
com.github.Traqueur-dev.CommandsAPI:platform-spigot:4.0.0 -
Relocate CommandsAPI when shading to avoid classpath conflicts
-
Replace any platform-bound logic with core + platform adapter model
-
Update
CommandManagerusage to use the new generic format -
Migrate any custom message handling, requirements, or command registration accordingly
π£οΈ Next Steps
Update your plugin(s) to the new modular structure to take advantage of:
- Cleaner API boundaries
- Better testability
- Support for multiple platforms in a single codebase
Full Changelog: 3.0.1...4.0.0