}
public boolean setUserData(String userName, UserDataView userDataView) {
User user = UserManager.getInstance().findUser(userName);
if (user != null) {
UserData userData = user.getUserData();
if (userData == null) {
userData = new UserData(UserGroup.PLAYER, userDataView.getAvatarId(), userDataView.isShowAbilityPickerForced(), userDataView.getUserSkipPrioritySteps());
user.setUserData(userData);
} else {
if (userDataView.getAvatarId() == 51) { // Update special avatar if first avatar is selected
updateAvatar(userName, userData);
}
userData.setAvatarId(userDataView.getAvatarId());
userData.setShowAbilityPickerForced(userDataView.isShowAbilityPickerForced());
userData.setUserSkipPrioritySteps(userDataView.getUserSkipPrioritySteps());
}
return true;
}
return false;
}