⚠️ removed CompositeCommand#setPermissionPrefix(String)

The permissionPrefix is now inherited from the addon's.
This commit is contained in:
Florian CUNY 2018-10-27 16:42:29 +02:00
parent d9a15ceedd
commit b6230f2bdf

View File

@ -131,6 +131,7 @@ public abstract class CompositeCommand extends Command implements PluginIdentifi
// Default references to description and parameters
setDescription(COMMANDS + label + ".description");
setParametersHelp(COMMANDS + label + ".parameters");
permissionPrefix = (addon != null) ? addon.getPermissionPrefix() : "";
setup();
if (!getSubCommand("help").isPresent() && !label.equals("help")) {
new DefaultHelpCommand(this);
@ -609,16 +610,6 @@ public abstract class CompositeCommand extends Command implements PluginIdentifi
return permissionPrefix;
}
/**
* Set the permission prefix. This will be added automatically to the permission
* and will apply to any sub commands too.
* Do not put a dot on the end of it.
* @param permissionPrefix the permissionPrefix to set
*/
public void setPermissionPrefix(String permissionPrefix) {
this.permissionPrefix = permissionPrefix + ".";
}
/**
* The the world that this command applies to.
* @return the world