mirror of
https://github.com/essentials/Essentials.git
synced 2025-08-25 23:46:15 +02:00
Reduce permissions checking when generating /help
This commit is contained in:
@@ -47,6 +47,7 @@ public class HelpInput implements IText
|
||||
newLines.clear();
|
||||
lines.add(_("helpFrom", p.getDescription().getName()));
|
||||
}
|
||||
final boolean isOnWhitelist = user.isAuthorized("essentials.help." + pluginNameLow);
|
||||
|
||||
for (Map.Entry<String, Map<String, Object>> k : cmds.entrySet())
|
||||
{
|
||||
@@ -81,7 +82,7 @@ public class HelpInput implements IText
|
||||
{
|
||||
permissions = value.get(PERMISSIONS);
|
||||
}
|
||||
if (user.isAuthorized("essentials.help." + pluginNameLow))
|
||||
if (isOnWhitelist)
|
||||
{
|
||||
pluginLines.add(_("helpLine", k.getKey(), value.get(DESCRIPTION)));
|
||||
}
|
||||
|
Reference in New Issue
Block a user