Fix usernames showing as "null" and NPE related to primaryGroup not copying correctly

This commit is contained in:
Luck
2016-08-29 12:11:03 +01:00
Unverified
parent 2cc65160b4
commit f5995c0afa
6 changed files with 62 additions and 1 deletions
@@ -84,7 +84,10 @@ public class UserMainCommand extends MainCommand<User> {
}
}
if (!plugin.getDatastore().loadUser(u, "null")) {
String name = plugin.getDatastore().getName(u);
if (name == null) name = "null";
if (!plugin.getDatastore().loadUser(u, name)) {
Message.LOADING_ERROR.send(sender);
}