From 1cf0d856a7083929f6309c976e3a93d92e6c0313 Mon Sep 17 00:00:00 2001 From: speed <43330808+speedxx@users.noreply.github.com> Date: Mon, 30 Nov 2020 17:26:23 -0500 Subject: [PATCH] fix check --- .../java/me/totalfreedom/tfguilds/command/ListSubcommand.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/me/totalfreedom/tfguilds/command/ListSubcommand.java b/src/main/java/me/totalfreedom/tfguilds/command/ListSubcommand.java index c400888..50b68e3 100644 --- a/src/main/java/me/totalfreedom/tfguilds/command/ListSubcommand.java +++ b/src/main/java/me/totalfreedom/tfguilds/command/ListSubcommand.java @@ -45,7 +45,7 @@ public class ListSubcommand extends Common implements CommandExecutor } } - if (pageIndex > paged.getPageCount() || pageIndex + 1 < paged.getPageCount()) + if (pageIndex < 1 || pageIndex > paged.getPageCount()) { sender.sendMessage(ChatColor.RED + "Not a valid page number"); return true;