diff --git a/Core/src/main/java/com/plotsquared/core/command/Visit.java b/Core/src/main/java/com/plotsquared/core/command/Visit.java index 3eb22d8a6..c998ba0b8 100644 --- a/Core/src/main/java/com/plotsquared/core/command/Visit.java +++ b/Core/src/main/java/com/plotsquared/core/command/Visit.java @@ -245,7 +245,15 @@ public class Visit extends Command { }); 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 [page] // /p v [page] // /p v [page]