Esempio n. 1
0
 @Override
 public String[] getGroups() {
   String[] s = new String[perms.getGroupManager().getDefaultGroupSet().getGroups().size()];
   int i = 0;
   for (Group g : perms.getGroupManager().getDefaultGroupSet().getGroups()) {
     s[i] = g.getName();
     i++;
   }
   return s;
 }
Esempio n. 2
0
  @Override
  public String[] getPlayerGroups(String world, String player) {
    OfflinePlayer op = Bukkit.getOfflinePlayer(player);
    GroupSet set = perms.getGroupManager().getWorldSet(Bukkit.getWorld(world));
    User user = set.getUser(op);

    Set<Group> children = user.getChildren(true);
    List<String> groups = new ArrayList<String>();
    for (Group child : children) {
      groups.add(child.getName());
    }
    return groups.toArray(new String[groups.size()]);
  }