Class CommandEngine

java.lang.Object
com.ultikits.ultitools.command.engine.CommandEngine

@Internal public final class CommandEngine extends Object
Internal cross-package facade; all tree and binding details stay in this package.
  • Field Details

  • Constructor Details

    • CommandEngine

      public CommandEngine()
      Creates the Paper-backed engine.
    • CommandEngine

      CommandEngine(NativeArgumentTypes types, Logger logger)
  • Method Details

    • register

      public boolean register(Object owner, String ownerName, BaseCommandExecutor executor, String description, String permission, boolean requireOp, List<String> aliases)
      Registers an annotation executor under its owner without accessing Paper's dispatcher.
      Parameters:
      owner - the ownership token
      ownerName - the diagnostic name
      executor - the live executor
      description - the resolved description
      permission - the root permission
      requireOp - the root operator requirement
      aliases - the root label followed by its aliases
      Returns:
      whether ownership accepted the command
    • registerInternalListeners

      public void registerInternalListeners()
      Installs the framework listener once during enable, independently of command registration.
    • register

      public boolean register(Object owner, String ownerName, BrigadierCommand command)
      Registers a module-provided Brigadier tree with the same ownership lifecycle.
      Parameters:
      owner - the ownership token
      ownerName - the diagnostic name
      command - the hand-written command bean
      Returns:
      whether ownership accepted the command
    • unregister

      public void unregister(Object owner)
      Releases only the specified owner's commands.
      Parameters:
      owner - the ownership token
    • close

      public void close()
      Releases module, external and framework bindings together.
    • ownerByLabel

      public Object ownerByLabel(String label)
      Resolves ownership through a primary label, alias or namespaced spelling.
      Parameters:
      label - the command spelling
      Returns:
      the owner, or null when no binding exists