Send usage for '/p v' for too many arguments

This commit is contained in:
Traks 2021-07-22 21:58:09 +02:00 committed by dordsor21
parent a83a79c17e
commit 1e41734826

View File

@ -182,6 +182,11 @@ public class Visit extends Command {
final RunnableVal3<Command, Runnable, Runnable> confirm, final RunnableVal3<Command, Runnable, Runnable> confirm,
final RunnableVal2<Command, CommandResult> whenDone final RunnableVal2<Command, CommandResult> whenDone
) throws CommandException { ) throws CommandException {
if (args.length > 3) {
sendUsage(player);
return CompletableFuture.completedFuture(false);
}
if (args.length == 1 && args[0].contains(":")) { if (args.length == 1 && args[0].contains(":")) {
args = args[0].split(":"); args = args[0].split(":");
} }