1
0
Fork 0
mirror of https://github.com/PaperMC/Paper.git synced 2025-02-17 02:34:30 +01:00

Support String UUID's in old player skulls

Should fix remaining skull issues for people with unconverted old skulls.

Fixes 
This commit is contained in:
Aikar 2020-07-03 02:16:51 -04:00
parent d6e23b14a7
commit d1261a7551

View file

@ -7,6 +7,22 @@ We have stored UUID in plenty of places that did not get DFU'd
So just look for old format and load it if it exists.
diff --git a/src/main/java/net/minecraft/server/GameProfileSerializer.java b/src/main/java/net/minecraft/server/GameProfileSerializer.java
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
--- a/src/main/java/net/minecraft/server/GameProfileSerializer.java
+++ b/src/main/java/net/minecraft/server/GameProfileSerializer.java
@@ -0,0 +0,0 @@ public final class GameProfileSerializer {
s = nbttagcompound.getString("Name");
}
+ // Paper start - support string UUID's
+ if (nbttagcompound.hasKeyOfType("Id", 8)) {
+ uuid = UUID.fromString(nbttagcompound.getString("Id"));
+ }
+ // Paper end
if (nbttagcompound.b("Id")) {
uuid = nbttagcompound.a("Id");
}
diff --git a/src/main/java/net/minecraft/server/NBTTagCompound.java b/src/main/java/net/minecraft/server/NBTTagCompound.java
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
--- a/src/main/java/net/minecraft/server/NBTTagCompound.java