From cc974c795fe3431fa020caf5bb7efba3f120bb3c Mon Sep 17 00:00:00 2001 From: tastybento Date: Sun, 8 Aug 2021 18:41:43 -0700 Subject: [PATCH] Added deprecation suppression. --- src/main/java/world/bentobox/bentobox/util/ItemParser.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/main/java/world/bentobox/bentobox/util/ItemParser.java b/src/main/java/world/bentobox/bentobox/util/ItemParser.java index a8912b6ea..90a3e8faf 100644 --- a/src/main/java/world/bentobox/bentobox/util/ItemParser.java +++ b/src/main/java/world/bentobox/bentobox/util/ItemParser.java @@ -212,6 +212,7 @@ public class ItemParser { * @param part String array that contains at least 2 elements. * @return Player head with given properties. */ + @SuppressWarnings("deprecation") private static ItemStack parsePlayerHead(String[] part) { ItemStack playerHead; @@ -242,7 +243,7 @@ public class ItemParser { } else if (part[1].length() == 32) { // trimmed UUID length are 32 chars. meta.setOwningPlayer(Bukkit.getOfflinePlayer( - UUID.fromString(part[1].replaceAll("(\\w{8})(\\w{4})(\\w{4})(\\w{4})(\\w{12})", "$1-$2-$3-$4-$5")))); + UUID.fromString(part[1].replaceAll("(\\w{8})(\\w{4})(\\w{4})(\\w{4})(\\w{12})", "$1-$2-$3-$4-$5")))); } else if (part[1].length() == 36) { // full UUID length are 36 chars. meta.setOwningPlayer(Bukkit.getOfflinePlayer(UUID.fromString(part[1])));