diff --git a/Spigot-Server-Patches/MC-Utils.patch b/Spigot-Server-Patches/MC-Utils.patch index 8f5b167197..596d96722b 100644 --- a/Spigot-Server-Patches/MC-Utils.patch +++ b/Spigot-Server-Patches/MC-Utils.patch @@ -2397,8 +2397,10 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 } + -+ @Nullable public UUID getUUID(String prefix) { return a(prefix); } // Paper - OBFHELPER -+ @Nullable ++ /** ++ * You must use {@link #hasUUID(String)} before or else it <b>will</b> throw an NPE. ++ */ ++ public UUID getUUID(String prefix) { return a(prefix); } // Paper - OBFHELPER public UUID a(String s) { return GameProfileSerializer.a(this.get(s)); } 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 3a734ee0c5..5a9f5dddd0 100644 --- a/Spigot-Server-Patches/Support-old-UUID-format-for-NBT.patch +++ b/Spigot-Server-Patches/Support-old-UUID-format-for-NBT.patch @@ -41,8 +41,8 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 } @@ -0,0 +0,0 @@ public class NBTTagCompound implements NBTBase { - @Nullable public UUID getUUID(String prefix) { return a(prefix); } // Paper - OBFHELPER - @Nullable + */ + public UUID getUUID(String prefix) { return a(prefix); } // Paper - OBFHELPER public UUID a(String s) { + // Paper start - support old format + if (!hasKeyOfType(s, 11) && this.hasKeyOfType(s + "Most", 99) && this.hasKeyOfType(s + "Least", 99)) {