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

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

public abstract class FabricCommandManager<C,S extends net.minecraft.commands.SharedSuggestionProvider> extends org.incendo.cloud.CommandManager<C> implements org.incendo.cloud.brigadier.BrigadierManagerHolder<C,S>, org.incendo.cloud.SenderMapperHolder<S,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 interface org.incendo.cloud.brigadier.BrigadierManagerHolder

    org.incendo.cloud.brigadier.BrigadierManagerHolder.BrigadierManagerNotPresent
  • Method Summary

    Modifier and Type
    Method
    Description
    final @NonNull org.incendo.cloud.brigadier.CloudBrigadierManager<C,S>
    final boolean
    final @NonNull org.incendo.cloud.SenderMapper<S,C>
     
    final @NonNull org.incendo.cloud.suggestion.SuggestionFactory<C,? extends org.incendo.cloud.brigadier.suggestion.TooltipSuggestion>
     

    Methods inherited from class org.incendo.cloud.CommandManager

    capabilities, captionFormatter, captionFormatter, captionRegistry, captionRegistry, command, command, command, commandExecutor, commandRegistrationHandler, commandRegistrationHandler, commands, commandSyntaxFormatter, commandSyntaxFormatter, commandTree, componentBuilder, createDefaultCommandMeta, createHelpHandler, createHelpHandler, decorateBuilder, deleteRootCommand, exceptionController, flagBuilder, hasCapability, hasPermission, helpHandlerFactory, helpHandlerFactory, isCommandRegistrationAllowed, lockRegistration, parameterInjectorRegistry, parserRegistry, postprocessContext, preprocessContext, registerCapability, registerCommandPostProcessor, registerCommandPreProcessor, rootCommands, settings, state, suggestionProcessor, suggestionProcessor, testPermission, transitionIfPossible

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    Methods inherited from interface org.incendo.cloud.CommandBuilderSource

    commandBuilder, commandBuilder, commandBuilder, commandBuilder, commandBuilder, commandBuilder

    Methods inherited from interface org.incendo.cloud.state.Stateful

    requireState, transitionOrThrow
  • Method Details

    • senderMapper

      public final @NonNull org.incendo.cloud.SenderMapper<S,C> senderMapper()
      Specified by:
      senderMapper in interface org.incendo.cloud.SenderMapperHolder<C,S extends net.minecraft.commands.SharedSuggestionProvider>
    • suggestionFactory

      public final @NonNull org.incendo.cloud.suggestion.SuggestionFactory<C,? extends org.incendo.cloud.brigadier.suggestion.TooltipSuggestion> suggestionFactory()
      Overrides:
      suggestionFactory in class org.incendo.cloud.CommandManager<C>
    • hasBrigadierManager

      @API(status=STABLE, since="2.0.0") public final boolean hasBrigadierManager()

      This will always return true for FabricCommandManagers.

      Specified by:
      hasBrigadierManager in interface org.incendo.cloud.brigadier.BrigadierManagerHolder<C,S extends net.minecraft.commands.SharedSuggestionProvider>
      Returns:
      true
      Since:
      2.0.0
    • brigadierManager

      @API(status=STABLE, since="2.0.0") public final @NonNull org.incendo.cloud.brigadier.CloudBrigadierManager<C,S> brigadierManager()

      FabricCommandManagers always use Brigadier for registration, so the aforementioned check is not needed.

      Specified by:
      brigadierManager in interface org.incendo.cloud.brigadier.BrigadierManagerHolder<C,S extends net.minecraft.commands.SharedSuggestionProvider>
      Returns: