diff options
author | KHobbits <rob@khobbits.co.uk> | 2012-12-20 22:54:36 +0000 |
---|---|---|
committer | KHobbits <rob@khobbits.co.uk> | 2012-12-20 22:54:36 +0000 |
commit | 1218a0b217ddbcb335aaf55eedbe078fc78d4c87 (patch) | |
tree | 56e6b87e073d9fe795fc4111a5aba6113c37134e | |
parent | adb75b69c299c37365e52b1429ebe34de2243e03 (diff) | |
download | Essentials-1218a0b217ddbcb335aaf55eedbe078fc78d4c87.tar Essentials-1218a0b217ddbcb335aaf55eedbe078fc78d4c87.tar.gz Essentials-1218a0b217ddbcb335aaf55eedbe078fc78d4c87.tar.lz Essentials-1218a0b217ddbcb335aaf55eedbe078fc78d4c87.tar.xz Essentials-1218a0b217ddbcb335aaf55eedbe078fc78d4c87.zip |
Reduce permissions checking when generating /help
-rw-r--r-- | Essentials/src/com/earth2me/essentials/textreader/HelpInput.java | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/Essentials/src/com/earth2me/essentials/textreader/HelpInput.java b/Essentials/src/com/earth2me/essentials/textreader/HelpInput.java index 4efb6c43f..60d567f65 100644 --- a/Essentials/src/com/earth2me/essentials/textreader/HelpInput.java +++ b/Essentials/src/com/earth2me/essentials/textreader/HelpInput.java @@ -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))); } |