From d1261a7551270df402ce15ed4fe7cd42c9023ef8 Mon Sep 17 00:00:00 2001 From: Aikar Date: Fri, 3 Jul 2020 02:16:51 -0400 Subject: [PATCH] Support String UUID's in old player skulls Should fix remaining skull issues for people with unconverted old skulls. Fixes #3734 --- .../Support-old-UUID-format-for-NBT.patch | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/Spigot-Server-Patches/Support-old-UUID-format-for-NBT.patch b/Spigot-Server-Patches/Support-old-UUID-format-for-NBT.patch index 9b8a3ec027..4cdc4dd1ae 100644 --- a/Spigot-Server-Patches/Support-old-UUID-format-for-NBT.patch +++ b/Spigot-Server-Patches/Support-old-UUID-format-for-NBT.patch @@ -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