Remove unused class

This commit is contained in:
TheMode 2021-04-18 00:19:57 +02:00
parent 8f3ee93191
commit dd88a14b90
2 changed files with 17 additions and 4 deletions

View File

@ -1,5 +1,6 @@
package net.minestom.server.command.builder;
import com.google.common.annotations.Beta;
import net.minestom.server.command.CommandSender;
import net.minestom.server.command.builder.arguments.Argument;
import net.minestom.server.command.builder.arguments.ArgumentDynamicStringArray;
@ -199,11 +200,24 @@ public class Command {
*
* @see #addConditionalSyntax(CommandCondition, CommandExecutor, Argument[])
*/
@NotNull
public Collection<CommandSyntax> addSyntax(@NotNull CommandExecutor executor, @NotNull Argument<?>... args) {
public @NotNull Collection<CommandSyntax> addSyntax(@NotNull CommandExecutor executor, @NotNull Argument<?>... args) {
return addConditionalSyntax(null, executor, args);
}
/**
* Creates a syntax from a formatted string.
* <p>
* Currently in beta as the format is not final.
*
* @param executor the syntax executor
* @param format the syntax format
* @return the newly created {@link CommandSyntax syntaxes}.
*/
@Beta
public @NotNull Collection<CommandSyntax> addSyntax(@NotNull CommandExecutor executor, @NotNull String format) {
return addSyntax(executor, ArgumentType.generate(format));
}
/**
* Gets the main command's name.
*

View File

@ -4,7 +4,6 @@ import net.kyori.adventure.text.Component;
import net.minestom.server.command.CommandSender;
import net.minestom.server.command.builder.Command;
import net.minestom.server.command.builder.CommandContext;
import net.minestom.server.command.builder.arguments.ArgumentType;
public class TestCommand extends Command {
@ -12,7 +11,7 @@ public class TestCommand extends Command {
super("testcmd");
setDefaultExecutor(this::usage);
addSyntax((sender, context) -> System.out.println("executed"), ArgumentType.generate("test get"));
addSyntax((sender, context) -> System.out.println("executed"), "test get");
}
private void usage(CommandSender sender, CommandContext context) {