diff --git a/SaneEconomyCore/src/main/java/org/appledash/saneeconomy/command/type/BalanceTopCommand.java b/SaneEconomyCore/src/main/java/org/appledash/saneeconomy/command/type/BalanceTopCommand.java index bd3aa13..e6968fb 100644 --- a/SaneEconomyCore/src/main/java/org/appledash/saneeconomy/command/type/BalanceTopCommand.java +++ b/SaneEconomyCore/src/main/java/org/appledash/saneeconomy/command/type/BalanceTopCommand.java @@ -43,7 +43,11 @@ public class BalanceTopCommand extends SaneEconomyCommand { if (args.length == 1) { try { - offset = 10 * Math.abs(Integer.parseInt(args[0])); + int page = Math.abs(Integer.parseInt(args[0])); + if (page > 1) { + page--; + } + offset = 10 * page; } catch (NumberFormatException e) { MessageUtils.sendMessage(sender, "%s is not a valid number."); return; diff --git a/SaneEconomyCore/src/main/java/org/appledash/saneeconomy/utils/MapUtil.java b/SaneEconomyCore/src/main/java/org/appledash/saneeconomy/utils/MapUtil.java index 4aba3ac..fe3f7bc 100644 --- a/SaneEconomyCore/src/main/java/org/appledash/saneeconomy/utils/MapUtil.java +++ b/SaneEconomyCore/src/main/java/org/appledash/saneeconomy/utils/MapUtil.java @@ -34,7 +34,7 @@ public class MapUtil { continue; } - if (newMap.size() > amount) { + if (newMap.size() >= amount) { break; }