Skip to content

v3.0.0

Choose a tag to compare

@Mqzn Mqzn released this 14 Mar 18:12
· 101 commits to master since this release

Imperat v3.0.0

A major evolution of the Imperat command framework

Version Status API Kotlin Minecraft


Core Focus

  • Removing unnecessary complexity
  • Improving command parsing intelligence
  • Expanding extensibility
  • Modernizing internal architecture

Bug Fixes

  • Fixed inaccurate retrieval of closest usage during InvalidSyntaxException handling for more reliable usage suggestions

Breaking API Changes

  • APA removed — Auto Permission Assigner removed due to unnecessary complexity and low usage
  • Renamed APIs — Source → CommandSource, @Usage → @Execute, Argument → ParsedArgument, CommandInputStream → Cursor, BaseParameterType → ArgumentType, CommandParameter → Argument, @Priority → @ParseOrder
  • @Permission now repeatable — Multiple permissions can be applied on same element
  • New PermissionData system — Supports logical operators like @Permission("staff.admin | staff.moderator")
  • UsageVerifier replaced → AmbiguityChecker — now validates at command level

New Features

  • ArgumentType Priority Resolution — Resolves ambiguous command variants using argument priorities (int takes precedence over String for "123")
  • ArgumentTypeHandler — Cleaner architecture for custom types
  • Argument Validators — Custom validation via Argument#addValidator(...) with priority support, annotated with @Validators
  • Flexible Flags — Position-independent, can appear anywhere in command input, no longer need to place before greedy args
  • @Shortcut — Define command aliases and shortcut forms
  • @ArgType — Assign custom argument types to individual arguments without global registration
  • Either<A, B> — New union argument type (e.g., Either<Player, UUID>)
  • @Secret — Hide commands from help menus and tab completion
  • Limited Greedy Arguments — Controlled greedy parsing with token limits
  • EventBus — Built-in event system with Imperat#listen(...) and Imperat#publish(...), customizable via ImperatConfigBuilder#eventBus(...)
  • Built-in Events — CommandPreRegistrationEvent, CommandPostRegistrationEvent
  • Responses System — Centralized response configuration, cleaner command code, fully customizable framework responses
  • Automatic INVALID_SYNTAX handling — Removes need for manual fallback usages

Platform Support

  • Added support for Minecraft 1.21.11 thanks to @FlameyosSnowy
  • Added support for Kotlin features, thanks to @FlameyosSnowy
  • Platform argument types are now auto-registered for Bukkit, Hytale, and Minestom