mirror of
https://github.com/TotalFreedomMC/TF-EssentialsX.git
synced 2025-02-12 04:20:41 +00:00
Reduce permissions checking when generating /help
This commit is contained in:
parent
adb75b69c2
commit
1218a0b217
1 changed files with 2 additions and 1 deletions
|
@ -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 a new issue