Skip to content

Releases: MeveraStudios/Imperat

v3.6.0

Choose a tag to compare

@Mqzn Mqzn released this 27 Apr 08:21

Critical changes

  • Moved from Java 17 to Java 21
  • Update Adventure-API to 5.0.0

Patches

  • Removed ambiguity check for command names, allow for updating of commands during runtime by re-registering them.
  • Fixed: closest usage does not work sometimes on complex sub-commands hierarchies.
  • Fixed: flags execution and suggestion providing not working properly.
  • Fixed: values declared in @Values not being showed up in suggestions.
  • Fixed: failing types leading to failing of whole branches early, surfacing as InvalidSyntaxException
  • Fixed: Permissions on pathway-methods of subcommands are declared to be owned by the whole subcommand NOT per pathway.
  • FEATURE UPDATE: @PathwayCommand now accepts multiple syntaxes. thanks to @iiAhmedYT

v3.5.0

Choose a tag to compare

@Mqzn Mqzn released this 16 Apr 20:14

Imperat v3.5.0

✅ Notable fixes

  • Fixed method-level permission enforcement coverage (with regression tests).
  • Improved closest-usage detection behavior in syntax failures.
  • Improved greedy argument + switch interaction behavior in parsing logic.
  • Improved internal null-safety/edge-case handling in permission and suggestion paths.

🚀 Other Highlights

Help system redesign (new API model)

Imperat’s help pipeline was refactored into a cleaner and more extensible architecture:

  • New query → render → send flow (CommandHelp, HelpResult, HelpRenderer, HelpSender).
  • Added built-in text and Adventure renderers (TextHelpRenderer, AdventureHelpRenderer).
  • Removed legacy theme/coordinator component model in favor of a simpler rendering API.

Why it matters: easier customization and better separation of help data from presentation/output.


Command tree execution + parsing refactor

Large internal execution refactor with better deterministic behavior:

  • Tree execution now works with ExecutionContext directly and reuses parse results.
  • Added ParseResult pipeline without changes to the API and improved optional argument handling.
  • Removed old parameter resolution chain system (ParameterValueAssigner and related flow handlers).
  • Improved invalid usage formatting and closest-usage output consistency.

Why it matters: more stable command resolution, fewer edge-case parsing issues, and better maintainability.


Auto-completion improvements (major)

Autocomplete behavior was significantly improved:

  • Better handling of trailing spaces and argument slicing.
  • More accurate optional-argument overlap suggestions.
  • Better literal/alias suggestion behavior.
  • Improved permission-aware suggestions (including method/pathway permission contexts).
  • New completion caches for better performance in large command trees.
  • Better flag-aware completion behavior and filtering.

Why it matters: cleaner UX for end users and improved performance/consistency for large command sets.


Flag improvements.

Important correctness fixes in command argument handling:

  • Refined flag lookup/normalization and faster flag resolution path.
    Why it matters: avoids incorrect target resolution and improves command reliability in production.

Bukkit-specific improvements

  • Improved TargetSelector parsing flow for Bukkit target selectors.
  • Fixed selection logic bug in SelectionType nearest-player resolution (sender assignment bug fixed).
  • Added a default suggestion provider for online players in Bukkit config builder (visibility-aware).
  • Improved Brigadier alias handling and alias suggestion coverage (tested).
  • Syntax/error response formatting improvements (color/error channel consistency in tests and behavior).

Why it matters: better command UX and more predictable suggestions on Bukkit/Paper servers.



⚠️ Migration notes

If you customized/help-themed old APIs:

  • Legacy help-theme/coordinator based extension points were removed/refactored.
  • Migrate custom help output to the new renderer/sender model (HelpRenderer + HelpSender + CommandHelp.show/render).
  • Review any integrations relying on old help/theme/* classes and old help component types.

If you maintain deep internals/extensions:

  • Execution/parsing internals changed substantially (ExecutionContext flow, tree parsing, optional handling).
  • Revalidate custom argument types and advanced command tree extensions against v3.5.0 behavior.

v3.4.0

Choose a tag to compare

@Mqzn Mqzn released this 06 Apr 04:41

Changes

  • Bug-fix: aliases of root command not being detected correctly only when using brigadier integration.
  • Bug-fix: Tab completion for flags that are in between different subcommands.
  • Improved: the handling of greedy-by-nature argument-types, and thus eliminating the need for overriding ArgumentType#parse(ExecutionContext<S>, Cursor<S>).
  • Added validation for command names used in annotations like @RootCommand or @SubCommand to ensure the names do not contain any spaces.
  • Added NEW method Cursor#collectRawArguments(int) (this is more of an internal change)

Breaking change:

  • Refactored the method ArgumentType#parse(CommandContext<S>, String)
    to ArgumentType#parse(CommandContext<S>, Argument<S>, String).

Full Changelog: v3.3.0...v3.4.0

v3.3.0

Choose a tag to compare

@Mqzn Mqzn released this 04 Apr 00:36

Changes:

  • Added a parameter in @Async that takes a class of type ExecutorServiceProvider to allow users to set their own ExecutorService for async execution.
  • Fixed Player parameters not recognized as arguments.
  • Fixed permission checks not working properly.
  • Fixed numeric arguments with ranges not working correctly if the argument is optional.
  • Fixed auto-completion results of numeric arguments not being formatted/handled correctly.
  • Fixed: brigadier/minecraft original arg-types parsing classpath overlapping with existing predefined types like Integer got removed.
  • Set the message of EventException be visible only if ImperatDebugger is enabled.
  • Refactored the constructor of PermissionDeniedException, to include extra data (e.g: the entity that caused this exception to be thrown, it could be an argument, a pathway, or even a command including subcommands).
  • Changed the handling logic of PermissionDeniedException.
  • Refactored PermissionChecker#checkPermission method to return Pair<PermissionHolder, Boolean> instead of boolean.

Internal Changes:

  • Added method NumberArgument#cast
  • Renamed InputParameter and NumericParameter to InputArgument and NumericArgument; update related references and implementations for consistency

Full Changelog: v3.2.0...v3.3.0

v3.2.0

Choose a tag to compare

@Mqzn Mqzn released this 01 Apr 15:06

Changes

  • Bug-Fix: fixed a bug where aliases of literal nodes weren't being interpreted by brigadier (while brigadier integration is ON).
  • Replaced applyBrigadier with a parameter to be used , e.g: BukkitImperat.builder(yourPlugin, true).
  • Refactored InvalidSyntaxException constructor.
  • Improved the default exception handling logic for InvalidSyntaxException , and global default-pathway.

v3.1.0

Choose a tag to compare

@Mqzn Mqzn released this 21 Mar 00:00

Critical patch:

This patch includes a new feature, several bug fixes and a single breaking change

Breaking API Change:

Refactored the ArgumentType#parse , now the method is two.
ArgumentType now has two parse methods.
One that needs only a single string, and one for complex parsing:

image

Why ?

Because parsing doesn't happen only through out the execution with the instance of Cursor at runtime.
It happens during default value providing, which needs only a string, and even before execution during the tree-traversal.
This way, things are more clear and simpler.
Moreover, the old method sometimes provided different values of correspondingInput and the current raw-input from Cursor.
causing confusion for the users.

Bug fixes:

  • Fixed Initialization error for BukkitImperat in the bukkit module
  • Fixed NPE error on brigadier integration with the bukkit module.

NEW Feature

Introducing @PathwayCommand:
When you wanted to create a hierarchy of subcommands you usually will need to create nested class for each subcommand level.
With this new feature there's no need to do that anymore (that doesn't mean the old way is useless).
Here's an example:

public class RankCommand {

    @PathwayCommand("rank <rank> permission set <perm> [value]")
    public void setPermission(TestCommandSource source, String rank, String perm, @Default("true") boolean value) {
        System.out.println("Set permission " + perm + " to " + value + " for rank " + rank);
    }

    @PathwayCommand("rank <rank> permission unset <perm>")
    public void unsetPermission(TestCommandSource source, String rank, String perm) {
        System.out.println("Unset permission " + perm + " for rank " + rank);
    }

}

Full Changelog: v3.0.0...v3.1.0

v3.0.0

Choose a tag to compare

@Mqzn Mqzn released this 14 Mar 18:12

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 APIsSourceCommandSource, @Usage@Execute, ArgumentParsedArgument, CommandInputStreamCursor, BaseParameterTypeArgumentType, CommandParameterArgument, @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 replacedAmbiguityChecker — 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 EventsCommandPreRegistrationEvent, 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

v2.4.2 | Global Fixes

Choose a tag to compare

@iiAhmedYT iiAhmedYT released this 19 Jan 21:58

✨ What's New

🎮 Hytale

  • Fix permissions not being checked correctly on Hytale
  • Refactor Hytale's PlayerRef retrieval (by name) to always work regardless of thread

✈️ Velocity

  • Fix permissions not being checked correctly on Velocity

🟠 Minestom

  • Change default permission resolving to false instead of true if @Permission is there
    To check for permissions set your own PermissionChecker when building your Imperat instance

Full Changelog: v2.4.1...v2.4.2

v2.4.1 | Minor Hytale Fix

Choose a tag to compare

@iiAhmedYT iiAhmedYT released this 19 Jan 15:24

🐛 Bug Fixes

🎮 Hytale

  • Fixed command aliases not registering
  • Fixed subcommands not working due to #setAllowsExtraArguments being off by default

Full Changelog: v2.4.0...v2.4.1

v2.4.0 | Extneded Hytale Support

Choose a tag to compare

@iiAhmedYT iiAhmedYT released this 19 Jan 12:08

✨ What's New

🌍 Global

  • You can now set your own CommandCoordinator using ConfigBuilder#globalCoordinator(CommandCoordinator)

🎮 Hytale

  • Add #reply(Message) to HytaleSource
  • Extended hytale support, stopped usage of deprecated APIs
  • Use java 21 instead of java 25 in hytale module to support older java versions (you won't be affected)

Full Changelog: v2.3.0...v2.4.0