This commit is contained in:
KHobbits 2011-07-15 20:59:40 +01:00
parent 39352da929
commit d7080950b0

View File

@ -56,21 +56,20 @@ public class Commandhelp extends EssentialsCommand
List<String> lines = getHelpLines(user, match);
if (lines.size() > 0)
{
int start = (page - 1) * 9;
int pages = lines.size() / 9 + (lines.size() % 9 > 0 ? 1 : 0);
int start = (page - 1) * 9;
int pages = lines.size() / 9 + (lines.size() % 9 > 0 ? 1 : 0);
user.sendMessage(Util.format("helpPages", page, pages));
for (int i = start; i < lines.size() && i < start + 9; i++)
{
user.sendMessage(lines.get(i));
}
user.sendMessage(Util.format("helpPages", page, pages));
for (int i = start; i < lines.size() && i < start + 9; i++)
{
user.sendMessage(lines.get(i));
}
}
else
{
user.sendMessage(Util.i18n("noHelpFound"));
}
}
}
@Override
protected void run(Server server, CommandSender sender, String commandLabel, String[] args) throws Exception