Commands now have the ability to set a permission required before execution

By: Dinnerbone <dinnerbone@dinnerbone.com>
This commit is contained in:
Bukkit/Spigot
2011-09-02 19:20:54 +01:00
parent 8c73a0ec1b
commit e60edf31eb
9 changed files with 407 additions and 144 deletions

View File

@@ -31,6 +31,10 @@ public final class PluginCommand extends Command {
return false;
}
if (!testPermission(sender)) {
return true;
}
try {
success = executor.onCommand(sender, this, commandLabel, args);
} catch (Throwable ex) {