Fix GroupManager user migration

This commit is contained in:
Luck 2016-10-28 17:58:36 +01:00
parent 66f756575a
commit 77e3b351fd
No known key found for this signature in database
GPG Key ID: EFA9B3EC5FD90F8B

View File

@ -260,14 +260,14 @@ public class MigrationGroupManager extends SubCommand<Object> {
ex.printStackTrace();
}
}
}
String primaryGroup = primaryGroups.get(e.getKey());
if (primaryGroup != null) {
try {
user.setPermission("group." + primaryGroup, true);
} catch (ObjectAlreadyHasException ignored) {}
user.setPrimaryGroup(primaryGroup);
}
String primaryGroup = primaryGroups.get(e.getKey());
if (primaryGroup != null) {
try {
user.setPermission("group." + primaryGroup, true);
} catch (ObjectAlreadyHasException ignored) {}
user.setPrimaryGroup(primaryGroup);
}
plugin.getDatastore().saveUser(user);