Class CommandManager

java.lang.Object
net.minecraft.server.command.CommandManager

public class CommandManager extends Object
Mappings:
Namespace Name
named net/minecraft/server/command/CommandManager
intermediary net/minecraft/class_2170
official ex
  • Field Details

    • CURRENT_CONTEXT

      private static final ThreadLocal<CommandExecutionContext<ServerCommandSource>> 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 Lex;f:Ljava/lang/ThreadLocal;
    • LOGGER

      private static final Logger 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 Lex;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 Lex;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 Lex;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 Lex;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 Lex;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 Lex;e:I
    • dispatcher

      private final com.mojang.brigadier.CommandDispatcher<ServerCommandSource> 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 Lex;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> Lex;<init>(Lex$a;Les;)V
  • Method Details

    • withCommandSource

      public static <S> com.mojang.brigadier.ParseResults<S> withCommandSource(com.mojang.brigadier.ParseResults<S> parseResults, UnaryOperator<S> sourceMapper)
      Returns parseResults with sourceMapper applied to the command source.
      Returns:
      parseResults with sourceMapper 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 Lex;a(Lcom/mojang/brigadier/ParseResults;Ljava/util/function/UnaryOperator;)Lcom/mojang/brigadier/ParseResults;
    • executeWithPrefix

      public void executeWithPrefix(ServerCommandSource source, String command)
      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 Lex;a(Lew;Ljava/lang/String;)V
    • execute

      public void execute(com.mojang.brigadier.ParseResults<ServerCommandSource> parseResults, String command)
      Executes command. 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 Lex;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 Lex;a(Lcom/mojang/brigadier/ParseResults;Ljava/lang/String;Lew;)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 Lex;a(Lew;Ljava/util/function/Consumer;)V
    • sendCommandTree

      public void sendCommandTree(ServerPlayerEntity player)
      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 Lex;a(Lasi;)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 Lex;a(Lcom/mojang/brigadier/tree/CommandNode;Lcom/mojang/brigadier/tree/CommandNode;Lew;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 Lex;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 Lex;a(Ljava/lang/String;Lcom/mojang/brigadier/arguments/ArgumentType;)Lcom/mojang/brigadier/builder/RequiredArgumentBuilder;
    • getCommandValidator

      public static Predicate<String> getCommandValidator(CommandManager.CommandParser parser)
      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 Lex;a(Lex$b;)Ljava/util/function/Predicate;
    • getDispatcher

      public com.mojang.brigadier.CommandDispatcher<ServerCommandSource> 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 Lex;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 Lex;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 Lex;b(Lcom/mojang/brigadier/ParseResults;)Lcom/mojang/brigadier/exceptions/CommandSyntaxException;
    • createRegistryAccess

      public static CommandRegistryAccess createRegistryAccess(RegistryWrapper.WrapperLookup registries)
      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 Lex;a(Ljs$a;)Les;
    • 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 Lex;b()V