Skip to content

4.0.0

Choose a tag to compare

@Traqueur-dev Traqueur-dev released this 04 Jul 15:36
· 15 commits to master since this release

πŸ“¦ 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.
⚠️ This update is NOT backward compatible.


🚨 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/Bukkit
    • platform-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.0
    

    e.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 CommandManager usage 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