This commit is contained in:
NotMyFault 2021-07-12 18:12:54 +02:00
parent 635e18e7ed
commit 2d1e3b8c03
No known key found for this signature in database
GPG Key ID: 158F5701A6AAD00C

View File

@ -245,7 +245,15 @@ public class Visit extends Command {
}); });
break; break;
} }
page = Integer.parseInt(args[1]); try {
page = Integer.parseInt(args[1]);
} catch (NumberFormatException ignored) {
player.sendMessage(
TranslatableCaption.of("invalid.not_a_number"),
Template.of("value", args[1])
);
return CompletableFuture.completedFuture(false);
}
// /p v <name> [page] // /p v <name> [page]
// /p v <uuid> [page] // /p v <uuid> [page]
// /p v <plot> [page] // /p v <plot> [page]