Added Addon#getPermissionPrefix

This commit is contained in:
Florian CUNY 2018-10-27 16:41:24 +02:00
parent b286bb3296
commit d9a15ceedd

View File

@ -326,4 +326,13 @@ public abstract class Addon implements AddonInterface {
public void logError(String string) { public void logError(String string) {
getPlugin().logError(string); getPlugin().logError(string);
} }
/**
* Returns the permission prefix corresponding to this addon.
* It contains the addon's name plus a trailing dot.
* @return
*/
public String getPermissionPrefix() {
return this.getDescription().getName().toLowerCase() + ".";
}
} }