From adae7f3cf01897db86b5903d313b61fb5e612b42 Mon Sep 17 00:00:00 2001 From: Sauilitired Date: Mon, 3 Nov 2014 18:05:12 +0100 Subject: [PATCH] Derp --- .../com/intellectualcrafters/plot/commands/MainCommand.java | 3 ++- .../main/java/com/intellectualcrafters/plot/commands/list.java | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/PlotSquared/src/main/java/com/intellectualcrafters/plot/commands/MainCommand.java b/PlotSquared/src/main/java/com/intellectualcrafters/plot/commands/MainCommand.java index 2e858f32b..534df829e 100644 --- a/PlotSquared/src/main/java/com/intellectualcrafters/plot/commands/MainCommand.java +++ b/PlotSquared/src/main/java/com/intellectualcrafters/plot/commands/MainCommand.java @@ -174,7 +174,8 @@ public class MainCommand implements CommandExecutor, TabCompleter { */ public static ArrayList helpMenu(Player player, final SubCommand.CommandCategory category, int page) { List commands = getCommands(category, player); - final int totalPages = ((int) Math.ceil(12 * (commands.size()) / 100)); + //final int totalPages = ((int) Math.ceil(12 * (commands.size()) / 100)); + int totalPages = (int) Math.ceil(commands.size() / 12); if(page > totalPages) page = totalPages; int max = (page * 12) + 12; diff --git a/PlotSquared/src/main/java/com/intellectualcrafters/plot/commands/list.java b/PlotSquared/src/main/java/com/intellectualcrafters/plot/commands/list.java index 0055491b9..5d0aaf139 100644 --- a/PlotSquared/src/main/java/com/intellectualcrafters/plot/commands/list.java +++ b/PlotSquared/src/main/java/com/intellectualcrafters/plot/commands/list.java @@ -86,7 +86,8 @@ public class list extends SubCommand { } //Get the total pages - int totalPages = ((int) Math.ceil(12 * (PlotMain.getPlotsSorted().size()) / 100)); + //int totalPages = ((int) Math.ceil(12 * (PlotMain.getPlotsSorted().size()) / 100)); + int totalPages = (int) Math.ceil(PlotMain.getPlotsSorted().size() / 12); if(page > totalPages) page = totalPages;