Package net.minecraft.commands
Class Commands
java.lang.Object
net.minecraft.commands.Commands
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic enum
static interface
-
Field Summary
Modifier and TypeFieldDescriptionprivate static final ThreadLocal
<ExecutionContext<CommandSourceStack>> private final com.mojang.brigadier.CommandDispatcher
<CommandSourceStack> static final int
static final int
static final int
static final int
static final int
private static final org.slf4j.Logger
-
Constructor Summary
ConstructorDescriptionCommands
(Commands.CommandSelection p_230943_, CommandBuildContext p_230944_) -
Method Summary
Modifier and TypeMethodDescriptionstatic <T> com.mojang.brigadier.builder.RequiredArgumentBuilder
<CommandSourceStack, T> static CommandBuildContext
createValidationContext
(HolderLookup.Provider p_256243_) createValidator
(Commands.ParseFunction p_82121_) static void
executeCommandInContext
(CommandSourceStack p_306118_, Consumer<ExecutionContext<CommandSourceStack>> p_306332_) private void
fillUsableCommands
(com.mojang.brigadier.tree.CommandNode<CommandSourceStack> p_82113_, com.mojang.brigadier.tree.CommandNode<SharedSuggestionProvider> p_82114_, CommandSourceStack p_82115_, Map<com.mojang.brigadier.tree.CommandNode<CommandSourceStack>, com.mojang.brigadier.tree.CommandNode<SharedSuggestionProvider>> p_82116_) private static com.mojang.brigadier.context.ContextChain
<CommandSourceStack> finishParsing
(com.mojang.brigadier.ParseResults<CommandSourceStack> p_307220_, String p_307311_, CommandSourceStack p_307676_) com.mojang.brigadier.CommandDispatcher
<CommandSourceStack> static <S> com.mojang.brigadier.exceptions.CommandSyntaxException
getParseException
(com.mojang.brigadier.ParseResults<S> p_82098_) static com.mojang.brigadier.builder.LiteralArgumentBuilder
<CommandSourceStack> static <S> com.mojang.brigadier.ParseResults
<S> mapSource
(com.mojang.brigadier.ParseResults<S> p_242928_, UnaryOperator<S> p_242890_) void
performCommand
(com.mojang.brigadier.ParseResults<CommandSourceStack> p_242844_, String p_242841_) void
performPrefixedCommand
(CommandSourceStack p_230958_, String p_230959_) void
sendCommands
(ServerPlayer p_82096_) static void
validate()
static <S> void
validateParseResults
(com.mojang.brigadier.ParseResults<S> p_306093_)
-
Field Details
-
CURRENT_EXECUTION_CONTEXT
-
LOGGER
private static final org.slf4j.Logger LOGGER -
LEVEL_ALL
public static final int LEVEL_ALL- See Also:
-
LEVEL_MODERATORS
public static final int LEVEL_MODERATORS- See Also:
-
LEVEL_GAMEMASTERS
public static final int LEVEL_GAMEMASTERS- See Also:
-
LEVEL_ADMINS
public static final int LEVEL_ADMINS- See Also:
-
LEVEL_OWNERS
public static final int LEVEL_OWNERS- See Also:
-
dispatcher
-
-
Constructor Details
-
Commands
-
-
Method Details
-
mapSource
public static <S> com.mojang.brigadier.ParseResults<S> mapSource(com.mojang.brigadier.ParseResults<S> p_242928_, UnaryOperator<S> p_242890_) -
performPrefixedCommand
-
performCommand
public void performCommand(com.mojang.brigadier.ParseResults<CommandSourceStack> p_242844_, String p_242841_) -
finishParsing
@Nullable private static com.mojang.brigadier.context.ContextChain<CommandSourceStack> finishParsing(com.mojang.brigadier.ParseResults<CommandSourceStack> p_307220_, String p_307311_, CommandSourceStack p_307676_) -
executeCommandInContext
public static void executeCommandInContext(CommandSourceStack p_306118_, Consumer<ExecutionContext<CommandSourceStack>> p_306332_) -
sendCommands
-
fillUsableCommands
private void fillUsableCommands(com.mojang.brigadier.tree.CommandNode<CommandSourceStack> p_82113_, com.mojang.brigadier.tree.CommandNode<SharedSuggestionProvider> p_82114_, CommandSourceStack p_82115_, Map<com.mojang.brigadier.tree.CommandNode<CommandSourceStack>, com.mojang.brigadier.tree.CommandNode<SharedSuggestionProvider>> p_82116_) -
literal
public static com.mojang.brigadier.builder.LiteralArgumentBuilder<CommandSourceStack> literal(String p_82128_) -
argument
public static <T> com.mojang.brigadier.builder.RequiredArgumentBuilder<CommandSourceStack,T> argument(String p_82130_, com.mojang.brigadier.arguments.ArgumentType<T> p_82131_) -
createValidator
-
getDispatcher
-
validateParseResults
public static <S> void validateParseResults(com.mojang.brigadier.ParseResults<S> p_306093_) throws com.mojang.brigadier.exceptions.CommandSyntaxException - Throws:
com.mojang.brigadier.exceptions.CommandSyntaxException
-
getParseException
@Nullable public static <S> com.mojang.brigadier.exceptions.CommandSyntaxException getParseException(com.mojang.brigadier.ParseResults<S> p_82098_) -
createValidationContext
-
validate
public static void validate()
-