Package net.minecraft.server.command
Class CommandManager
java.lang.Object
net.minecraft.server.command.CommandManager
- Mappings:
Namespace Name named net/minecraft/server/command/CommandManager
intermediary net/minecraft/class_2170
official eq
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic interface
static enum
Describes the environment in which commands are registered. -
Field Summary
Modifier and TypeFieldDescriptionprivate static final ThreadLocal
<CommandExecutionContext<ServerCommandSource>> private final com.mojang.brigadier.CommandDispatcher
<ServerCommandSource> static final int
static final int
static final int
static final int
static final int
private static final Logger
-
Constructor Summary
ConstructorDescriptionCommandManager
(CommandManager.RegistrationEnvironment environment, CommandRegistryAccess commandRegistryAccess) -
Method Summary
Modifier and TypeMethodDescriptionstatic <T> com.mojang.brigadier.builder.RequiredArgumentBuilder
<ServerCommandSource, T> static void
callWithContext
(ServerCommandSource commandSource, Consumer<CommandExecutionContext<ServerCommandSource>> callback) private static @Nullable com.mojang.brigadier.context.ContextChain
<ServerCommandSource> checkCommand
(com.mojang.brigadier.ParseResults<ServerCommandSource> parseResults, String command, ServerCommandSource source) static void
static CommandRegistryAccess
createRegistryAccess
(RegistryWrapper.WrapperLookup registryLookup) void
execute
(com.mojang.brigadier.ParseResults<ServerCommandSource> parseResults, String command) Executescommand
.void
executeWithPrefix
(ServerCommandSource source, String command) Executescommand
.com.mojang.brigadier.CommandDispatcher
<ServerCommandSource> static <S> @Nullable com.mojang.brigadier.exceptions.CommandSyntaxException
getException
(com.mojang.brigadier.ParseResults<S> parse) static com.mojang.brigadier.builder.LiteralArgumentBuilder
<ServerCommandSource> private void
makeTreeForSource
(com.mojang.brigadier.tree.CommandNode<ServerCommandSource> tree, com.mojang.brigadier.tree.CommandNode<CommandSource> result, ServerCommandSource source, Map<com.mojang.brigadier.tree.CommandNode<ServerCommandSource>, com.mojang.brigadier.tree.CommandNode<CommandSource>> resultNodes) void
sendCommandTree
(ServerPlayerEntity player) static <S> void
throwException
(com.mojang.brigadier.ParseResults<S> parse) static <S> com.mojang.brigadier.ParseResults
<S> withCommandSource
(com.mojang.brigadier.ParseResults<S> parseResults, UnaryOperator<S> sourceMapper) ReturnsparseResults
withsourceMapper
applied to the command source.
-
Field Details
-
CURRENT_CONTEXT
- Mappings:
Namespace Name Mixin selector named CURRENT_CONTEXT
Lnet/minecraft/server/command/CommandManager;CURRENT_CONTEXT:Ljava/lang/ThreadLocal;
intermediary field_46823
Lnet/minecraft/class_2170;field_46823:Ljava/lang/ThreadLocal;
official f
Leq;f:Ljava/lang/ThreadLocal;
-
LOGGER
- Mappings:
Namespace Name Mixin selector named LOGGER
Lnet/minecraft/server/command/CommandManager;LOGGER:Lorg/slf4j/Logger;
intermediary field_9833
Lnet/minecraft/class_2170;field_9833:Lorg/slf4j/Logger;
official g
Leq;g:Lorg/slf4j/Logger;
-
field_31837
public static final int field_31837- See Also:
- Mappings:
Namespace Name Mixin selector named field_31837
Lnet/minecraft/server/command/CommandManager;field_31837:I
intermediary field_31837
Lnet/minecraft/class_2170;field_31837:I
official a
Leq;a:I
-
field_31838
public static final int field_31838- See Also:
- Mappings:
Namespace Name Mixin selector named field_31838
Lnet/minecraft/server/command/CommandManager;field_31838:I
intermediary field_31838
Lnet/minecraft/class_2170;field_31838:I
official b
Leq;b:I
-
field_31839
public static final int field_31839- See Also:
- Mappings:
Namespace Name Mixin selector named field_31839
Lnet/minecraft/server/command/CommandManager;field_31839:I
intermediary field_31839
Lnet/minecraft/class_2170;field_31839:I
official c
Leq;c:I
-
field_31840
public static final int field_31840- See Also:
- Mappings:
Namespace Name Mixin selector named field_31840
Lnet/minecraft/server/command/CommandManager;field_31840:I
intermediary field_31840
Lnet/minecraft/class_2170;field_31840:I
official d
Leq;d:I
-
field_31841
public static final int field_31841- See Also:
- Mappings:
Namespace Name Mixin selector named field_31841
Lnet/minecraft/server/command/CommandManager;field_31841:I
intermediary field_31841
Lnet/minecraft/class_2170;field_31841:I
official e
Leq;e:I
-
dispatcher
- Mappings:
Namespace Name Mixin selector named dispatcher
Lnet/minecraft/server/command/CommandManager;dispatcher:Lcom/mojang/brigadier/CommandDispatcher;
intermediary field_9832
Lnet/minecraft/class_2170;field_9832:Lcom/mojang/brigadier/CommandDispatcher;
official h
Leq;h:Lcom/mojang/brigadier/CommandDispatcher;
-
-
Constructor Details
-
CommandManager
public CommandManager(CommandManager.RegistrationEnvironment environment, CommandRegistryAccess commandRegistryAccess) - Mappings:
Namespace Name Mixin selector named <init>
Lnet/minecraft/server/command/CommandManager;<init>(Lnet/minecraft/server/command/CommandManager$RegistrationEnvironment;Lnet/minecraft/command/CommandRegistryAccess;)V
intermediary <init>
Lnet/minecraft/class_2170;<init>(Lnet/minecraft/class_2170$class_5364;Lnet/minecraft/class_7157;)V
official <init>
Leq;<init>(Leq$a;Lel;)V
-
-
Method Details
-
withCommandSource
public static <S> com.mojang.brigadier.ParseResults<S> withCommandSource(com.mojang.brigadier.ParseResults<S> parseResults, UnaryOperator<S> sourceMapper) ReturnsparseResults
withsourceMapper
applied to the command source.- Returns:
parseResults
withsourceMapper
applied to the command source- Mappings:
Namespace Name Mixin selector named withCommandSource
Lnet/minecraft/server/command/CommandManager;withCommandSource(Lcom/mojang/brigadier/ParseResults;Ljava/util/function/UnaryOperator;)Lcom/mojang/brigadier/ParseResults;
intermediary method_45018
Lnet/minecraft/class_2170;method_45018(Lcom/mojang/brigadier/ParseResults;Ljava/util/function/UnaryOperator;)Lcom/mojang/brigadier/ParseResults;
official a
Leq;a(Lcom/mojang/brigadier/ParseResults;Ljava/util/function/UnaryOperator;)Lcom/mojang/brigadier/ParseResults;
-
executeWithPrefix
Executescommand
. Unlikeexecute(com.mojang.brigadier.ParseResults<net.minecraft.server.command.ServerCommandSource>, java.lang.String)
the command can be prefixed with a slash.- Mappings:
Namespace Name Mixin selector named executeWithPrefix
Lnet/minecraft/server/command/CommandManager;executeWithPrefix(Lnet/minecraft/server/command/ServerCommandSource;Ljava/lang/String;)V
intermediary method_44252
Lnet/minecraft/class_2170;method_44252(Lnet/minecraft/class_2168;Ljava/lang/String;)V
official a
Leq;a(Lep;Ljava/lang/String;)V
-
execute
public void execute(com.mojang.brigadier.ParseResults<ServerCommandSource> parseResults, String command) Executescommand
. The command cannot be prefixed with a slash.- See Also:
- Mappings:
Namespace Name Mixin selector named execute
Lnet/minecraft/server/command/CommandManager;execute(Lcom/mojang/brigadier/ParseResults;Ljava/lang/String;)V
intermediary method_9249
Lnet/minecraft/class_2170;method_9249(Lcom/mojang/brigadier/ParseResults;Ljava/lang/String;)V
official a
Leq;a(Lcom/mojang/brigadier/ParseResults;Ljava/lang/String;)V
-
checkCommand
@Nullable private static @Nullable com.mojang.brigadier.context.ContextChain<ServerCommandSource> checkCommand(com.mojang.brigadier.ParseResults<ServerCommandSource> parseResults, String command, ServerCommandSource source) - Mappings:
Namespace Name Mixin selector named checkCommand
Lnet/minecraft/server/command/CommandManager;checkCommand(Lcom/mojang/brigadier/ParseResults;Ljava/lang/String;Lnet/minecraft/server/command/ServerCommandSource;)Lcom/mojang/brigadier/context/ContextChain;
intermediary method_54492
Lnet/minecraft/class_2170;method_54492(Lcom/mojang/brigadier/ParseResults;Ljava/lang/String;Lnet/minecraft/class_2168;)Lcom/mojang/brigadier/context/ContextChain;
official a
Leq;a(Lcom/mojang/brigadier/ParseResults;Ljava/lang/String;Lep;)Lcom/mojang/brigadier/context/ContextChain;
-
callWithContext
public static void callWithContext(ServerCommandSource commandSource, Consumer<CommandExecutionContext<ServerCommandSource>> callback) - Mappings:
Namespace Name Mixin selector named callWithContext
Lnet/minecraft/server/command/CommandManager;callWithContext(Lnet/minecraft/server/command/ServerCommandSource;Ljava/util/function/Consumer;)V
intermediary method_54313
Lnet/minecraft/class_2170;method_54313(Lnet/minecraft/class_2168;Ljava/util/function/Consumer;)V
official a
Leq;a(Lep;Ljava/util/function/Consumer;)V
-
sendCommandTree
- Mappings:
Namespace Name Mixin selector named sendCommandTree
Lnet/minecraft/server/command/CommandManager;sendCommandTree(Lnet/minecraft/server/network/ServerPlayerEntity;)V
intermediary method_9241
Lnet/minecraft/class_2170;method_9241(Lnet/minecraft/class_3222;)V
official a
Leq;a(Larg;)V
-
makeTreeForSource
private void makeTreeForSource(com.mojang.brigadier.tree.CommandNode<ServerCommandSource> tree, com.mojang.brigadier.tree.CommandNode<CommandSource> result, ServerCommandSource source, Map<com.mojang.brigadier.tree.CommandNode<ServerCommandSource>, com.mojang.brigadier.tree.CommandNode<CommandSource>> resultNodes) - Mappings:
Namespace Name Mixin selector named makeTreeForSource
Lnet/minecraft/server/command/CommandManager;makeTreeForSource(Lcom/mojang/brigadier/tree/CommandNode;Lcom/mojang/brigadier/tree/CommandNode;Lnet/minecraft/server/command/ServerCommandSource;Ljava/util/Map;)V
intermediary method_9239
Lnet/minecraft/class_2170;method_9239(Lcom/mojang/brigadier/tree/CommandNode;Lcom/mojang/brigadier/tree/CommandNode;Lnet/minecraft/class_2168;Ljava/util/Map;)V
official a
Leq;a(Lcom/mojang/brigadier/tree/CommandNode;Lcom/mojang/brigadier/tree/CommandNode;Lep;Ljava/util/Map;)V
-
literal
public static com.mojang.brigadier.builder.LiteralArgumentBuilder<ServerCommandSource> literal(String literal) - Mappings:
Namespace Name Mixin selector named literal
Lnet/minecraft/server/command/CommandManager;literal(Ljava/lang/String;)Lcom/mojang/brigadier/builder/LiteralArgumentBuilder;
intermediary method_9247
Lnet/minecraft/class_2170;method_9247(Ljava/lang/String;)Lcom/mojang/brigadier/builder/LiteralArgumentBuilder;
official a
Leq;a(Ljava/lang/String;)Lcom/mojang/brigadier/builder/LiteralArgumentBuilder;
-
argument
public static <T> com.mojang.brigadier.builder.RequiredArgumentBuilder<ServerCommandSource,T> argument(String name, com.mojang.brigadier.arguments.ArgumentType<T> type) - Mappings:
Namespace Name Mixin selector named argument
Lnet/minecraft/server/command/CommandManager;argument(Ljava/lang/String;Lcom/mojang/brigadier/arguments/ArgumentType;)Lcom/mojang/brigadier/builder/RequiredArgumentBuilder;
intermediary method_9244
Lnet/minecraft/class_2170;method_9244(Ljava/lang/String;Lcom/mojang/brigadier/arguments/ArgumentType;)Lcom/mojang/brigadier/builder/RequiredArgumentBuilder;
official a
Leq;a(Ljava/lang/String;Lcom/mojang/brigadier/arguments/ArgumentType;)Lcom/mojang/brigadier/builder/RequiredArgumentBuilder;
-
getCommandValidator
- Mappings:
Namespace Name Mixin selector named getCommandValidator
Lnet/minecraft/server/command/CommandManager;getCommandValidator(Lnet/minecraft/server/command/CommandManager$CommandParser;)Ljava/util/function/Predicate;
intermediary method_9238
Lnet/minecraft/class_2170;method_9238(Lnet/minecraft/class_2170$class_2171;)Ljava/util/function/Predicate;
official a
Leq;a(Leq$b;)Ljava/util/function/Predicate;
-
getDispatcher
- Mappings:
Namespace Name Mixin selector named getDispatcher
Lnet/minecraft/server/command/CommandManager;getDispatcher()Lcom/mojang/brigadier/CommandDispatcher;
intermediary method_9235
Lnet/minecraft/class_2170;method_9235()Lcom/mojang/brigadier/CommandDispatcher;
official a
Leq;a()Lcom/mojang/brigadier/CommandDispatcher;
-
throwException
public static <S> void throwException(com.mojang.brigadier.ParseResults<S> parse) throws com.mojang.brigadier.exceptions.CommandSyntaxException - Throws:
com.mojang.brigadier.exceptions.CommandSyntaxException
- Mappings:
Namespace Name Mixin selector named throwException
Lnet/minecraft/server/command/CommandManager;throwException(Lcom/mojang/brigadier/ParseResults;)V
intermediary method_54312
Lnet/minecraft/class_2170;method_54312(Lcom/mojang/brigadier/ParseResults;)V
official a
Leq;a(Lcom/mojang/brigadier/ParseResults;)V
-
getException
@Nullable public static <S> @Nullable com.mojang.brigadier.exceptions.CommandSyntaxException getException(com.mojang.brigadier.ParseResults<S> parse) - Mappings:
Namespace Name Mixin selector named getException
Lnet/minecraft/server/command/CommandManager;getException(Lcom/mojang/brigadier/ParseResults;)Lcom/mojang/brigadier/exceptions/CommandSyntaxException;
intermediary method_23917
Lnet/minecraft/class_2170;method_23917(Lcom/mojang/brigadier/ParseResults;)Lcom/mojang/brigadier/exceptions/CommandSyntaxException;
official b
Leq;b(Lcom/mojang/brigadier/ParseResults;)Lcom/mojang/brigadier/exceptions/CommandSyntaxException;
-
createRegistryAccess
public static CommandRegistryAccess createRegistryAccess(RegistryWrapper.WrapperLookup registryLookup) - Mappings:
Namespace Name Mixin selector named createRegistryAccess
Lnet/minecraft/server/command/CommandManager;createRegistryAccess(Lnet/minecraft/registry/RegistryWrapper$WrapperLookup;)Lnet/minecraft/command/CommandRegistryAccess;
intermediary method_46732
Lnet/minecraft/class_2170;method_46732(Lnet/minecraft/class_7225$class_7874;)Lnet/minecraft/class_7157;
official a
Leq;a(Ljk$a;)Lel;
-
checkMissing
public static void checkMissing()- Mappings:
Namespace Name Mixin selector named checkMissing
Lnet/minecraft/server/command/CommandManager;checkMissing()V
intermediary method_30852
Lnet/minecraft/class_2170;method_30852()V
official b
Leq;b()V
-