mirror of
https://github.com/MilkBowl/Vault.git
synced 2024-12-27 03:17:51 +01:00
Added getGroups and getPrimaryGroup
This commit is contained in:
parent
389f5c3b6b
commit
027a493fc7
@ -276,4 +276,13 @@ public interface Permission {
|
||||
*/
|
||||
public void setGroupInfoString(String world, String groupName, String node, String value);
|
||||
|
||||
/**
|
||||
* Gets the list of groups that this player has
|
||||
*
|
||||
* @param world Name of World
|
||||
* @param playerName Name of Player
|
||||
*/
|
||||
public String[] getPlayerGroups(String world, String playerName);
|
||||
|
||||
public String getPrimaryGroup(String world, String playerName);
|
||||
}
|
||||
|
@ -338,4 +338,13 @@ public class Permission_Permissions implements Permission {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public String[] getPlayerGroups(String world, String playerName) {
|
||||
return this.permission.getHandler().getGroups(world, playerName);
|
||||
}
|
||||
|
||||
public String getPrimaryGroup(String world, String playerName) {
|
||||
return this.permission.getHandler().getPrimaryGroup(world, playerName);
|
||||
}
|
||||
}
|
@ -348,4 +348,13 @@ public class Permission_PermissionsEx implements Permission {
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public String[] getPlayerGroups(String world, String playerName) {
|
||||
return PermissionsEx.getPermissionManager().getUser(playerName).getGroupsNames();
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getPrimaryGroup(String world, String playerName) {
|
||||
return PermissionsEx.getPermissionManager().getUser(playerName).getGroupsNames()[0];
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user