Repository navigation
v3.0.0
Imperat v3.0.0
A major evolution of the Imperat command framework
Core Focus
- Removing unnecessary complexity
- Improving command parsing intelligence
- Expanding extensibility
- Modernizing internal architecture
Bug Fixes
- Fixed inaccurate retrieval of closest usage during
InvalidSyntaxExceptionhandling 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 @Permissionnow 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 registrationEither<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 withImperat#listen(...)andImperat#publish(...), customizable viaImperatConfigBuilder#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