mirror of
https://github.com/EssentialsX/Essentials.git
synced 2024-12-26 02:58:03 +01:00
Reduce permissions checking when generating /help
This commit is contained in:
parent
adb75b69c2
commit
1218a0b217
@ -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)));
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user