Package net.minecraft.server.command
Class CommandManager
java.lang.Object
net.minecraft.server.command.CommandManager
public class CommandManager extends Object
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static interfaceCommandManager.CommandParserstatic classCommandManager.RegistrationEnvironmentDescribes the environment in which commands are registered. -
Field Summary
Fields Modifier and Type Field Description private com.mojang.brigadier.CommandDispatcher<ServerCommandSource>dispatcherprivate static LoggerLOGGER -
Constructor Summary
Constructors Constructor Description CommandManager(CommandManager.RegistrationEnvironment environment) -
Method Summary
Modifier and Type Method Description static <T> com.mojang.brigadier.builder.RequiredArgumentBuilder<ServerCommandSource,T>argument(String name, com.mojang.brigadier.arguments.ArgumentType<T> type)static voidcheckMissing()intexecute(ServerCommandSource commandSource, String command)static Predicate<String>getCommandValidator(CommandManager.CommandParser parser)com.mojang.brigadier.CommandDispatcher<ServerCommandSource>getDispatcher()static <S> com.mojang.brigadier.exceptions.CommandSyntaxExceptiongetException(com.mojang.brigadier.ParseResults<S> parse)static com.mojang.brigadier.builder.LiteralArgumentBuilder<ServerCommandSource>literal(String literal)private voidmakeTreeForSource(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)voidsendCommandTree(ServerPlayerEntity player)
-
Field Details
-
LOGGER
-
dispatcher
-
-
Constructor Details
-
CommandManager
-
-
Method Details
-
execute
-
sendCommandTree
-
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) -
literal
public static com.mojang.brigadier.builder.LiteralArgumentBuilder<ServerCommandSource> literal(String literal) -
argument
public static <T> com.mojang.brigadier.builder.RequiredArgumentBuilder<ServerCommandSource,T> argument(String name, com.mojang.brigadier.arguments.ArgumentType<T> type) -
getCommandValidator
-
getDispatcher
-
getException
@Nullable public static <S> com.mojang.brigadier.exceptions.CommandSyntaxException getException(com.mojang.brigadier.ParseResults<S> parse) -
checkMissing
public static void checkMissing()
-