mirror of
https://github.com/Minestom/Minestom.git
synced 2024-11-15 15:16:46 +01:00
Remove unused class
This commit is contained in:
parent
8f3ee93191
commit
dd88a14b90
@ -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.
|
||||
*
|
||||
|
@ -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) {
|
||||
|
Loading…
Reference in New Issue
Block a user