Class Commands
java.lang.Object
net.minecraft.commands.Commands
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic enumstatic interface -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static final ClientboundCommandsPacket.NodeInspector<CommandSourceStack> static final Stringprivate static final ThreadLocal<@Nullable ExecutionContext<CommandSourceStack>> private final CommandDispatcher<CommandSourceStack> static final PermissionCheckstatic final PermissionCheckstatic final PermissionCheckstatic final PermissionCheckstatic final PermissionCheckprivate static final org.slf4j.Logger -
Constructor Summary
ConstructorsConstructorDescriptionCommands(Commands.CommandSelection commandSelection, CommandBuildContext context) -
Method Summary
Modifier and TypeMethodDescriptionstatic <T> RequiredArgumentBuilder<CommandSourceStack, T> argument(String name, ArgumentType<T> type) static CommandSourceStackcreateCompilationContext(PermissionSet compilationPermissions) static CommandBuildContextcreateValidationContext(HolderLookup.Provider registries) static voidexecuteCommandInContext(CommandSourceStack context, Consumer<ExecutionContext<CommandSourceStack>> config) private static <S> voidfillUsableCommands(CommandNode<S> source, CommandNode<S> target, S commandFilter, Map<CommandNode<S>, CommandNode<S>> converted) private static @Nullable ContextChain<CommandSourceStack> finishParsing(ParseResults<CommandSourceStack> command, String commandString, CommandSourceStack sender) static <S> @Nullable CommandSyntaxExceptiongetParseException(ParseResults<S> parse) static <T extends PermissionSetSupplier>
PermissionProviderCheck<T> hasPermission(PermissionCheck permission) static <S> ParseResults<S> mapSource(ParseResults<S> parse, UnaryOperator<S> sourceOperator) voidperformCommand(ParseResults<CommandSourceStack> command, String commandString) voidperformPrefixedCommand(CommandSourceStack sender, String command) voidsendCommands(ServerPlayer player) static StringtrimOptionalPrefix(String command) static voidvalidate()static <S> voidvalidateParseResults(ParseResults<S> command)
-
Field Details
-
COMMAND_PREFIX
- See Also:
-
CURRENT_EXECUTION_CONTEXT
private static final ThreadLocal<@Nullable ExecutionContext<CommandSourceStack>> CURRENT_EXECUTION_CONTEXT -
LOGGER
private static final org.slf4j.Logger LOGGER -
LEVEL_ALL
-
LEVEL_MODERATORS
-
LEVEL_GAMEMASTERS
-
LEVEL_ADMINS
-
LEVEL_OWNERS
-
COMMAND_NODE_INSPECTOR
private static final ClientboundCommandsPacket.NodeInspector<CommandSourceStack> COMMAND_NODE_INSPECTOR -
dispatcher
-
-
Constructor Details
-
Commands
-
-
Method Details
-
mapSource
-
performPrefixedCommand
-
trimOptionalPrefix
-
performCommand
-
finishParsing
private static @Nullable ContextChain<CommandSourceStack> finishParsing(ParseResults<CommandSourceStack> command, String commandString, CommandSourceStack sender) -
executeCommandInContext
public static void executeCommandInContext(CommandSourceStack context, Consumer<ExecutionContext<CommandSourceStack>> config) -
sendCommands
-
fillUsableCommands
private static <S> void fillUsableCommands(CommandNode<S> source, CommandNode<S> target, S commandFilter, Map<CommandNode<S>, CommandNode<S>> converted) -
literal
-
argument
public static <T> RequiredArgumentBuilder<CommandSourceStack, T> argument(String name, ArgumentType<T> type) -
createValidator
-
getDispatcher
-
validateParseResults
- Throws:
CommandSyntaxException
-
getParseException
-
createValidationContext
-
validate
public static void validate() -
hasPermission
public static <T extends PermissionSetSupplier> PermissionProviderCheck<T> hasPermission(PermissionCheck permission) -
createCompilationContext
-