From 8a77d5a450afaa8bc0dc5dc0ad66e6c3f0ce3d18 Mon Sep 17 00:00:00 2001 From: Traks Date: Thu, 22 Jul 2021 15:51:54 +0200 Subject: [PATCH] Fix index out of bounds for '/p h' --- .../src/main/java/com/plotsquared/core/command/HomeCommand.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Core/src/main/java/com/plotsquared/core/command/HomeCommand.java b/Core/src/main/java/com/plotsquared/core/command/HomeCommand.java index 9bbb1547b..d8ffa2a91 100644 --- a/Core/src/main/java/com/plotsquared/core/command/HomeCommand.java +++ b/Core/src/main/java/com/plotsquared/core/command/HomeCommand.java @@ -76,7 +76,7 @@ public class HomeCommand extends Command { if (plots.isEmpty()) { player.sendMessage(TranslatableCaption.of("invalid.found_no_plots")); return; - } else if (plots.size() < page) { + } else if (plots.size() < page || page < 1) { player.sendMessage( TranslatableCaption.of("invalid.number_not_in_range"), Template.of("min", "1"),