public class Commands
extends java.lang.Object
Modifier and Type | Class and Description |
---|---|
static interface |
Commands.IParser |
Modifier and Type | Field and Description |
---|---|
private com.mojang.brigadier.CommandDispatcher<CommandSource> |
dispatcher |
private static org.apache.logging.log4j.Logger |
LOGGER |
Constructor and Description |
---|
Commands(boolean isDedicatedServer) |
Modifier and Type | Method and Description |
---|---|
static <T> com.mojang.brigadier.builder.RequiredArgumentBuilder<CommandSource,T> |
argument(java.lang.String name,
com.mojang.brigadier.arguments.ArgumentType<T> type) |
private void |
commandSourceNodesToSuggestionNodes(com.mojang.brigadier.tree.CommandNode<CommandSource> rootCommandSource,
com.mojang.brigadier.tree.CommandNode<ISuggestionProvider> rootSuggestion,
CommandSource source,
java.util.Map<com.mojang.brigadier.tree.CommandNode<CommandSource>,com.mojang.brigadier.tree.CommandNode<ISuggestionProvider>> commandNodeToSuggestionNode) |
static java.util.function.Predicate<java.lang.String> |
func_212590_a(Commands.IParser parser) |
static <S> com.mojang.brigadier.exceptions.CommandSyntaxException |
func_227481_a_(com.mojang.brigadier.ParseResults<S> p_227481_0_) |
com.mojang.brigadier.CommandDispatcher<CommandSource> |
getDispatcher() |
int |
handleCommand(CommandSource source,
java.lang.String command) |
static com.mojang.brigadier.builder.LiteralArgumentBuilder<CommandSource> |
literal(java.lang.String name) |
void |
send(ServerPlayerEntity player) |
private static final org.apache.logging.log4j.Logger LOGGER
private final com.mojang.brigadier.CommandDispatcher<CommandSource> dispatcher
public int handleCommand(CommandSource source, java.lang.String command)
public void send(ServerPlayerEntity player)
private void commandSourceNodesToSuggestionNodes(com.mojang.brigadier.tree.CommandNode<CommandSource> rootCommandSource, com.mojang.brigadier.tree.CommandNode<ISuggestionProvider> rootSuggestion, CommandSource source, java.util.Map<com.mojang.brigadier.tree.CommandNode<CommandSource>,com.mojang.brigadier.tree.CommandNode<ISuggestionProvider>> commandNodeToSuggestionNode)
public static com.mojang.brigadier.builder.LiteralArgumentBuilder<CommandSource> literal(java.lang.String name)
public static <T> com.mojang.brigadier.builder.RequiredArgumentBuilder<CommandSource,T> argument(java.lang.String name, com.mojang.brigadier.arguments.ArgumentType<T> type)
public static java.util.function.Predicate<java.lang.String> func_212590_a(Commands.IParser parser)
public com.mojang.brigadier.CommandDispatcher<CommandSource> getDispatcher()
@Nullable public static <S> com.mojang.brigadier.exceptions.CommandSyntaxException func_227481_a_(com.mojang.brigadier.ParseResults<S> p_227481_0_)