From 98eb2c8d94b6e18434669981dedb01a0ae24285b Mon Sep 17 00:00:00 2001 From: Jake Potrebic Date: Fri, 23 Apr 2021 14:08:56 -0700 Subject: [PATCH] [CI-SKIP] Remove bad null annotation (#5538) --- Spigot-Server-Patches/MC-Utils.patch | 6 ++++-- Spigot-Server-Patches/Support-old-UUID-format-for-NBT.patch | 4 ++-- 2 files changed, 6 insertions(+), 4 deletions(-) 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 will 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)) {