Class NeoForgeServerCommandManager<C>
java.lang.Object
org.incendo.cloud.CommandManager<C>
org.incendo.cloud.neoforge.NeoForgeCommandManager<C>
org.incendo.cloud.neoforge.NeoForgeServerCommandManager<C>
- All Implemented Interfaces:
BrigadierManagerHolder<C, net.minecraft.commands.CommandSourceStack>, CommandBuilderSource<C>, SenderMapperHolder<net.minecraft.commands.CommandSourceStack, C>, Stateful<RegistrationState>
-
Nested Class Summary
Nested classes/interfaces inherited from interface BrigadierManagerHolder
BrigadierManagerHolder.BrigadierManagerNotPresent -
Constructor Summary
ConstructorsConstructorDescriptionNeoForgeServerCommandManager(ExecutionCoordinator<C> executionCoordinator, SenderMapper<net.minecraft.commands.CommandSourceStack, C> senderMapper) Create a new command manager instance. -
Method Summary
Modifier and TypeMethodDescriptionstatic NeoForgeServerCommandManager<net.minecraft.commands.CommandSourceStack> createNative(ExecutionCoordinator<net.minecraft.commands.CommandSourceStack> executionCoordinator) Create a command manager using native source types.booleanhasPermission(@NonNull C sender, @NonNull String permission) Check if the command sender has the required permission.Methods inherited from class NeoForgeCommandManager
brigadierManager, createDefaultCommandMeta, hasBrigadierManager, senderMapper, suggestionFactoryMethods inherited from class CommandManager
appendSuggestionMapper, capabilities, captionFormatter, captionFormatter, captionRegistry, captionRegistry, command, command, command, commandExecutor, commandRegistrationHandler, commandRegistrationHandler, commands, commandSyntaxFormatter, commandSyntaxFormatter, commandTree, componentBuilder, createHelpHandler, createHelpHandler, decorateBuilder, deleteRootCommand, exceptionController, flagBuilder, hasCapability, helpHandlerFactory, helpHandlerFactory, isCommandRegistrationAllowed, lockRegistration, parameterInjectorRegistry, parserRegistry, postprocessContext, preprocessContext, registerCapability, registerCommandPostProcessor, registerCommandPreProcessor, registerDefaultExceptionHandlers, rootCommands, settings, state, suggestionMapper, suggestionMapper, suggestionProcessor, suggestionProcessor, testPermission, transitionIfPossibleMethods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface CommandBuilderSource
commandBuilder, commandBuilder, commandBuilder, commandBuilder, commandBuilder, commandBuilderMethods inherited from interface Stateful
requireState, transitionOrThrow
-
Constructor Details
-
NeoForgeServerCommandManager
public NeoForgeServerCommandManager(ExecutionCoordinator<C> executionCoordinator, SenderMapper<net.minecraft.commands.CommandSourceStack, C> senderMapper) Create a new command manager instance.- Parameters:
executionCoordinator- Execution coordinator instance.senderMapper- Mapper between Minecraft'sCommandSourceStackand the command sender typeC.
-
-
Method Details
-
createNative
public static NeoForgeServerCommandManager<net.minecraft.commands.CommandSourceStack> createNative(ExecutionCoordinator<net.minecraft.commands.CommandSourceStack> executionCoordinator) Create a command manager using native source types.- Parameters:
executionCoordinator- Execution coordinator instance.- Returns:
- a new command manager
- See Also:
-
hasPermission
Check if the command sender has the required permission. If the permission node is empty, this should returntrue- Specified by:
hasPermissionin classCommandManager<C>- Parameters:
sender- Command senderpermission- Permission node- Returns:
trueif the sender has the permission, elsefalse- Throws:
PermissionNotRegisteredException- if the permission is not registered to NeoForge
-