Merge pull request #376 from mung3r/master

added hasGroupSupport to perm api
This commit is contained in:
Rodney Ramos 2013-03-14 12:01:53 -07:00
commit bd9d089a3e
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 * @return an Array of String of all groups
*/ */
abstract public String[] getGroups(); 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(); return API.getGroupNames();
} }
@Override
public boolean hasGroupSupport() {
return false;
}
} }

View File

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

View File

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

View File

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

View File

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

View File

@ -159,4 +159,9 @@ public class Permission_Privileges extends Permission {
public boolean hasSuperPermsCompat() { public boolean hasSuperPermsCompat() {
return true; 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]); 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; return false;
} }
} }
@Override
public boolean hasGroupSupport() {
return true;
}
} }

View File

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

View File

@ -177,4 +177,9 @@ public class Permission_Xperms extends Permission {
public String[] getGroups() { public String[] getGroups() {
return perms.getXperms().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() { public boolean hasSuperPermsCompat() {
return true; return true;
} }
@Override
public boolean hasGroupSupport() {
return true;
}
} }

View File

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

View File

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