mirror of
https://github.com/Multiverse/Multiverse-Core.git
synced 2024-11-22 10:36:06 +01:00
Return the Permission if it was created, or the old one if it existed.
This commit is contained in:
parent
69360a49ec
commit
b6755a1047
@ -181,12 +181,13 @@ public class MVPermissions implements PermissionsInterface {
|
||||
return true;
|
||||
}
|
||||
|
||||
public void addPermission(String string, PermissionDefault defaultValue) {
|
||||
public Permission addPermission(String string, PermissionDefault defaultValue) {
|
||||
if (this.plugin.getServer().getPluginManager().getPermission(string) == null) {
|
||||
Permission permission = new Permission(string, defaultValue);
|
||||
this.plugin.getServer().getPluginManager().addPermission(permission);
|
||||
this.addToParentPerms(string);
|
||||
}
|
||||
return this.plugin.getServer().getPluginManager().getPermission(string);
|
||||
}
|
||||
|
||||
private void addToParentPerms(String permString) {
|
||||
|
Loading…
Reference in New Issue
Block a user