Normalize UUID format in LocalUserDocument

This commit is contained in:
Jedediah Smith 2017-02-03 18:03:44 -05:00
parent c705c47d4b
commit b80a58c471
1 changed files with 3 additions and 2 deletions

View File

@ -15,6 +15,7 @@ import tc.oc.api.docs.SimplePlayerId;
import tc.oc.api.docs.User; import tc.oc.api.docs.User;
import tc.oc.api.docs.virtual.UserDoc; import tc.oc.api.docs.virtual.UserDoc;
import tc.oc.api.util.Permissions; import tc.oc.api.util.Permissions;
import tc.oc.api.util.UUIDs;
import tc.oc.minecraft.api.entity.OfflinePlayer; import tc.oc.minecraft.api.entity.OfflinePlayer;
public class LocalUserDocument extends SimplePlayerId implements User { public class LocalUserDocument extends SimplePlayerId implements User {
@ -22,8 +23,8 @@ public class LocalUserDocument extends SimplePlayerId implements User {
private final OfflinePlayer player; private final OfflinePlayer player;
public LocalUserDocument(OfflinePlayer player) { public LocalUserDocument(OfflinePlayer player) {
super(player.getUniqueId().toString(), super(UUIDs.normalize(player.getUniqueId()),
player.getUniqueId().toString(), UUIDs.normalize(player.getUniqueId()),
player.getLastKnownName().orElse("")); player.getLastKnownName().orElse(""));
this.player = player; this.player = player;