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

@@ -26,6 +26,7 @@ public class PluginCommandYamlParser {
Object description = entry.getValue().get("description");
Object usage = entry.getValue().get("usage");
Object aliases = entry.getValue().get("aliases");
Object permission = entry.getValue().get("permission");
if (description != null) {
newCmd.setDescription(description.toString());
@@ -49,6 +50,10 @@ public class PluginCommandYamlParser {
newCmd.setAliases(aliasList);
}
if (permission != null) {
newCmd.setPermission(permission.toString());
}
pluginCmds.add(newCmd);
}
}