diff --git a/common/src/main/java/me/lucko/luckperms/common/storage/backing/MongoDBBacking.java b/common/src/main/java/me/lucko/luckperms/common/storage/backing/MongoDBBacking.java index d56bb471f..56a68a822 100644 --- a/common/src/main/java/me/lucko/luckperms/common/storage/backing/MongoDBBacking.java +++ b/common/src/main/java/me/lucko/luckperms/common/storage/backing/MongoDBBacking.java @@ -325,7 +325,7 @@ public class MongoDBBacking extends AbstractBacking { boolean save = plugin.getUserManager().giveDefaultIfNeeded(user, false); - if (user.setName(name, false)) { + if (user.setName(d.getString("name"), false)) { save = true; } diff --git a/common/src/main/java/me/lucko/luckperms/common/storage/backing/SQLBacking.java b/common/src/main/java/me/lucko/luckperms/common/storage/backing/SQLBacking.java index cf3f0f435..8b48d29b3 100644 --- a/common/src/main/java/me/lucko/luckperms/common/storage/backing/SQLBacking.java +++ b/common/src/main/java/me/lucko/luckperms/common/storage/backing/SQLBacking.java @@ -343,13 +343,8 @@ public class SQLBacking extends AbstractBacking { } user.getPrimaryGroup().setStoredValue(pg); - String name = userName.get(); - if (name == null) { - name = "null"; - } - // Update their username to what was in the storage if the one in the local instance is null - user.setName(name, false); + user.setName(userName.get(), false); // If the user has any data in storage if (!data.isEmpty()) {