owh = groupManager.getWorldsHolder().getWorldData(worldName);
}
if (owh == null) {
return false;
}
User user = owh.getUser(playerName);
if (user == null) {
return false;
}
Group group = owh.getGroup(groupName);
if (group == null) {
return false;
}
if (user.getGroup().equals(owh.getDefaultGroup())) {
user.setGroup(group);
} else if (group.getInherits().contains(user.getGroup().getName().toLowerCase())) {
user.setGroup(group);
} else {
user.addSubGroup(group);
}
Player p = Bukkit.getPlayer(playerName);
if (p != null) {
GroupManager.BukkitPermissions.updatePermissions(p);
}