mirror of
https://github.com/EssentialsX/Essentials.git
synced 2024-09-06 04:58:00 +02:00
Adding a failure message for help search
This commit is contained in:
parent
132ddc323f
commit
39352da929
@ -54,15 +54,23 @@ public class Commandhelp extends EssentialsCommand
|
|||||||
}
|
}
|
||||||
|
|
||||||
List<String> lines = getHelpLines(user, match);
|
List<String> lines = getHelpLines(user, match);
|
||||||
int start = (page - 1) * 9;
|
if (lines.size() > 0)
|
||||||
|
{
|
||||||
|
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
|
||||||
|
{
|
||||||
|
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
|
||||||
|
@ -180,6 +180,7 @@ nickSet = \u00a77Your nickname is now \u00a7c{0}
|
|||||||
noAccessCommand = \u00a7cYou do not have access to that command.
|
noAccessCommand = \u00a7cYou do not have access to that command.
|
||||||
noAccessPermission = \u00a7cYou do not have permission to access that {0}.
|
noAccessPermission = \u00a7cYou do not have permission to access that {0}.
|
||||||
noDestroyPermission = \u00a7cYou do not have permission to destroy that {0}.
|
noDestroyPermission = \u00a7cYou do not have permission to destroy that {0}.
|
||||||
|
noHelpFound = \u00a7cNo matching commands.
|
||||||
noHomeSet = You have not set a home.
|
noHomeSet = You have not set a home.
|
||||||
noHomeSetPlayer = Player has not set a home.
|
noHomeSetPlayer = Player has not set a home.
|
||||||
noKitPermission = \u00a7cYou need the \u00a7c{0}\u00a7c permission to use that kit.
|
noKitPermission = \u00a7cYou need the \u00a7c{0}\u00a7c permission to use that kit.
|
||||||
|
Loading…
Reference in New Issue
Block a user