mirror of
https://github.com/EssentialsX/Essentials.git
synced 2024-09-06 04:58:00 +02:00
Format.
This commit is contained in:
parent
39352da929
commit
d7080950b0
@ -56,21 +56,20 @@ public class Commandhelp extends EssentialsCommand
|
|||||||
List<String> lines = getHelpLines(user, match);
|
List<String> lines = getHelpLines(user, match);
|
||||||
if (lines.size() > 0)
|
if (lines.size() > 0)
|
||||||
{
|
{
|
||||||
int start = (page - 1) * 9;
|
int start = (page - 1) * 9;
|
||||||
int pages = lines.size() / 9 + (lines.size() % 9 > 0 ? 1 : 0);
|
int pages = lines.size() / 9 + (lines.size() % 9 > 0 ? 1 : 0);
|
||||||
|
|
||||||
user.sendMessage(Util.format("helpPages", page, pages));
|
user.sendMessage(Util.format("helpPages", page, pages));
|
||||||
for (int i = start; i < lines.size() && i < start + 9; i++)
|
for (int i = start; i < lines.size() && i < start + 9; i++)
|
||||||
{
|
{
|
||||||
user.sendMessage(lines.get(i));
|
user.sendMessage(lines.get(i));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
user.sendMessage(Util.i18n("noHelpFound"));
|
user.sendMessage(Util.i18n("noHelpFound"));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void run(Server server, CommandSender sender, String commandLabel, String[] args) throws Exception
|
protected void run(Server server, CommandSender sender, String commandLabel, String[] args) throws Exception
|
||||||
|
Loading…
Reference in New Issue
Block a user