Code example for Set

Methods: size, toArray

0
        Set<String> groups = userGroups.get(player.toLowerCase());
        if (groups == null) {
            return new String[0];
        } 
 
        return groups.toArray(new String[groups.size()]);
    } 
 
    public boolean hasPermission(OfflinePlayer player, String permission) {
        return hasPermission(player.getName(), permission);
    } 
 
    public boolean hasPermission(String worldName, OfflinePlayer player, String permission) {
        return hasPermission(worldName, player.getName(), permission);
    } 
 
    public boolean inGroup(OfflinePlayer player, String group) {
        return inGroup(player.getName(), group);
    } 
 
    public String[] getGroups(OfflinePlayer player) {