added hasGroupSupport to Permission class

This commit is contained in:
mung3r 2013-03-14 11:32:04 -07:00
parent 3857950971
commit 73a0c8f5ab
14 changed files with 71 additions and 0 deletions

View File

@ -649,4 +649,10 @@ public abstract class Permission {
* @return an Array of String of all groups
*/
abstract public String[] getGroups();
/**
* Returns true if the given implementation supports groups.
* @return true if the implementation supports groups
*/
abstract public boolean hasGroupSupport();
}

View File

@ -137,4 +137,9 @@ public class Permission_DroxPerms extends Permission {
return API.getGroupNames();
}
@Override
public boolean hasGroupSupport() {
return false;
}
}

View File

@ -396,4 +396,9 @@ public class Permission_GroupManager extends Permission {
public boolean hasSuperPermsCompat() {
return true;
}
@Override
public boolean hasGroupSupport() {
return true;
}
}

View File

@ -298,4 +298,9 @@ public class Permission_Permissions3 extends Permission {
public boolean hasSuperPermsCompat() {
return false;
}
@Override
public boolean hasGroupSupport() {
return true;
}
}

View File

@ -232,4 +232,9 @@ public class Permission_PermissionsBukkit extends Permission {
public boolean hasSuperPermsCompat() {
return true;
}
@Override
public boolean hasGroupSupport() {
return true;
}
}

View File

@ -282,4 +282,9 @@ public class Permission_PermissionsEx extends Permission {
public boolean hasSuperPermsCompat() {
return true;
}
@Override
public boolean hasGroupSupport() {
return true;
}
}

View File

@ -159,4 +159,9 @@ public class Permission_Privileges extends Permission {
public boolean hasSuperPermsCompat() {
return true;
}
@Override
public boolean hasGroupSupport() {
return true;
}
}

View File

@ -219,4 +219,9 @@ public class Permission_SimplyPerms extends Permission{
return perms.getAllGroups().toArray(new String[0]);
}
@Override
public boolean hasGroupSupport() {
return true;
}
}

View File

@ -299,4 +299,9 @@ public class Permission_Starburst extends Permission {
return false;
}
}
@Override
public boolean hasGroupSupport() {
return true;
}
}

View File

@ -105,4 +105,9 @@ public class Permission_SuperPerms extends Permission {
public boolean hasSuperPermsCompat() {
return true;
}
@Override
public boolean hasGroupSupport() {
return false;
}
}

View File

@ -177,4 +177,9 @@ public class Permission_Xperms extends Permission {
public String[] getGroups() {
return perms.getXperms().getGroups();
}
@Override
public boolean hasGroupSupport() {
return true;
}
}

View File

@ -273,4 +273,9 @@ public class Permission_bPermissions extends Permission {
public boolean hasSuperPermsCompat() {
return true;
}
@Override
public boolean hasGroupSupport() {
return true;
}
}

View File

@ -197,4 +197,9 @@ public class Permission_bPermissions2 extends Permission {
public boolean hasSuperPermsCompat() {
return true;
}
@Override
public boolean hasGroupSupport() {
return true;
}
}

View File

@ -206,4 +206,9 @@ public class Permission_zPermissions extends Permission {
public String[] getGroups() {
return service.getAllGroups().toArray(new String[0]);
}
@Override
public boolean hasGroupSupport() {
return true;
}
}