Class FabricCommandManager<C,S extends net.minecraft.commands.SharedSuggestionProvider>

java.lang.Object
cloud.commandframework.CommandManager<C>
cloud.commandframework.fabric.FabricCommandManager<C,S>
Type Parameters:
C - the manager's sender type
S - the platform sender type
All Implemented Interfaces:
cloud.commandframework.brigadier.BrigadierManagerHolder<C>
Direct Known Subclasses:
FabricClientCommandManager, FabricServerCommandManager

public abstract class FabricCommandManager<C,S extends net.minecraft.commands.SharedSuggestionProvider> extends cloud.commandframework.CommandManager<C> implements cloud.commandframework.brigadier.BrigadierManagerHolder<C>
A command manager for either the server or client on Fabric.

Commands registered with managers of this type will be registered into a Brigadier command tree.

Where possible, Vanilla argument types are made available in a cloud-friendly format. In some cases, these argument types may only be available for server commands. Mod-provided argument types can be exposed to Cloud as well, by using WrappedBrigadierParser.

Since:
1.5.0
See Also:
  • Nested Class Summary

    Nested classes/interfaces inherited from class cloud.commandframework.CommandManager

    cloud.commandframework.CommandManager.ManagerSettings, cloud.commandframework.CommandManager.RegistrationState
  • Method Summary

    Modifier and Type
    Method
    Description
    final @NonNull Function<@NonNull C,@NonNull S>
    Gets the mapper from the manager's C type to a game SharedSuggestionProvider.
    final @NonNull cloud.commandframework.brigadier.CloudBrigadierManager<C,S>
     
    final @NonNull Function<@NonNull S,@NonNull C>
    Gets the mapper from a game SharedSuggestionProvider to the manager's C type.
    final @NonNull cloud.commandframework.meta.CommandMeta
     
    @NonNull cloud.commandframework.permission.PredicatePermission<C>
    permissionLevel(int permissionLevel)
    Get a permission predicate which passes when the sender has the specified permission level.

    Methods inherited from class cloud.commandframework.CommandManager

    argumentBuilder, capabilities, captionRegistry, captionRegistry, captionVariableReplacementHandler, captionVariableReplacementHandler, command, command, commandBuilder, commandBuilder, commandBuilder, commandBuilder, commandBuilder, commandBuilder, commandBuilder, commandBuilder, commandBuilder, commandExecutionCoordinator, commandRegistrationHandler, commandRegistrationHandler, commands, commandSuggestionProcessor, commandSuggestionProcessor, commandSyntaxFormatter, commandSyntaxFormatter, commandTree, createCommandHelpHandler, createCommandHelpHandler, deleteRootCommand, executeCommand, flagBuilder, getCaptionRegistry, getCommandHelpHandler, getCommandHelpHandler, getCommandRegistrationHandler, getCommands, getCommandSuggestionProcessor, getCommandSyntaxFormatter, getCommandTree, getExceptionHandler, getParserRegistry, getRegistrationState, getSetting, handleException, hasCapability, hasPermission, hasPermission, isCommandRegistrationAllowed, lockRegistration, parameterInjectorRegistry, parserRegistry, postprocessContext, preprocessContext, registerCapability, registerCommandPostProcessor, registerCommandPreProcessor, registerDefaultCaptions, registerExceptionHandler, registrationState, requireState, rootCommands, setCaptionRegistry, setCommandRegistrationHandler, setCommandSuggestionProcessor, setCommandSyntaxFormatter, setSetting, suggest, transitionIfPossible, transitionOrThrow

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Method Details

    • createDefaultCommandMeta

      public final @NonNull cloud.commandframework.meta.CommandMeta createDefaultCommandMeta()
      Specified by:
      createDefaultCommandMeta in class cloud.commandframework.CommandManager<C>
    • commandSourceMapper

      public final @NonNull Function<@NonNull S,@NonNull C> commandSourceMapper()
      Gets the mapper from a game SharedSuggestionProvider to the manager's C type.
      Returns:
      Command source mapper
      Since:
      1.5.0
    • backwardsCommandSourceMapper

      public final @NonNull Function<@NonNull C,@NonNull S> backwardsCommandSourceMapper()
      Gets the mapper from the manager's C type to a game SharedSuggestionProvider.
      Returns:
      Command source mapper
      Since:
      1.5.0
    • brigadierManager

      public final @NonNull cloud.commandframework.brigadier.CloudBrigadierManager<C,S> brigadierManager()
      Specified by:
      brigadierManager in interface cloud.commandframework.brigadier.BrigadierManagerHolder<C>
    • permissionLevel

      public @NonNull cloud.commandframework.permission.PredicatePermission<C> permissionLevel(int permissionLevel)
      Get a permission predicate which passes when the sender has the specified permission level.
      Parameters:
      permissionLevel - permission level to require
      Returns:
      a permission predicate
      Since:
      1.5.0