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 RunnableVal2<Command, CommandResult> whenDone
) throws CommandException {
if (args.length > 3) {
sendUsage(player);
return CompletableFuture.completedFuture(false);
}
if (args.length == 1 && args[0].contains(":")) {
args = args[0].split(":");
}