This commit is contained in:
Sauilitired 2014-11-03 18:05:12 +01:00
parent 687ad4cb9f
commit adae7f3cf0
2 changed files with 4 additions and 2 deletions

View File

@ -174,7 +174,8 @@ public class MainCommand implements CommandExecutor, TabCompleter {
*/ */
public static ArrayList<String> helpMenu(Player player, final SubCommand.CommandCategory category, int page) { public static ArrayList<String> helpMenu(Player player, final SubCommand.CommandCategory category, int page) {
List<SubCommand> commands = getCommands(category, player); List<SubCommand> 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) if(page > totalPages)
page = totalPages; page = totalPages;
int max = (page * 12) + 12; int max = (page * 12) + 12;

View File

@ -86,7 +86,8 @@ public class list extends SubCommand {
} }
//Get the total pages //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) if(page > totalPages)
page = totalPages; page = totalPages;