mirror of
https://github.com/Multiverse/Multiverse-Core.git
synced 2024-11-26 04:25:37 +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;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void addPermission(String string, PermissionDefault defaultValue) {
|
public Permission addPermission(String string, PermissionDefault defaultValue) {
|
||||||
if (this.plugin.getServer().getPluginManager().getPermission(string) == null) {
|
if (this.plugin.getServer().getPluginManager().getPermission(string) == null) {
|
||||||
Permission permission = new Permission(string, defaultValue);
|
Permission permission = new Permission(string, defaultValue);
|
||||||
this.plugin.getServer().getPluginManager().addPermission(permission);
|
this.plugin.getServer().getPluginManager().addPermission(permission);
|
||||||
this.addToParentPerms(string);
|
this.addToParentPerms(string);
|
||||||
}
|
}
|
||||||
|
return this.plugin.getServer().getPluginManager().getPermission(string);
|
||||||
}
|
}
|
||||||
|
|
||||||
private void addToParentPerms(String permString) {
|
private void addToParentPerms(String permString) {
|
||||||
|
Loading…
Reference in New Issue
Block a user