diff --git a/src/main/java/com/onarandombox/MultiverseCore/commands/PaginatedCommand.java b/src/main/java/com/onarandombox/MultiverseCore/commands/PaginatedCommand.java index 247a04ee..bad5a805 100644 --- a/src/main/java/com/onarandombox/MultiverseCore/commands/PaginatedCommand.java +++ b/src/main/java/com/onarandombox/MultiverseCore/commands/PaginatedCommand.java @@ -42,8 +42,11 @@ public abstract class PaginatedCommand extends Command { } protected void showPage(int page, CommandSender sender, List cmds) { + // Ensure the page is at least 1. + page = (page <= 0) ? 1 : page; int start = (page - 1) * ITEMS_PER_PAGE; int end = start + ITEMS_PER_PAGE; + for (int i = start; i < end; i++) { // For consistancy, print some extra lines if it's a player: if (i < cmds.size()) {