From 06bfcd26fb900e634a6e7db1dc749ec1f45cd5d9 Mon Sep 17 00:00:00 2001 From: Thinkofdeath Date: Wed, 30 Apr 2014 12:51:07 +0100 Subject: [PATCH] Allow skull owners to be removed --- ...141-Allow-skull-owners-to-be-removed.patch | 26 +++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 CraftBukkit-Patches/0141-Allow-skull-owners-to-be-removed.patch diff --git a/CraftBukkit-Patches/0141-Allow-skull-owners-to-be-removed.patch b/CraftBukkit-Patches/0141-Allow-skull-owners-to-be-removed.patch new file mode 100644 index 0000000000..4070ab1165 --- /dev/null +++ b/CraftBukkit-Patches/0141-Allow-skull-owners-to-be-removed.patch @@ -0,0 +1,26 @@ +From 3198cb0e2bcba88fd3d5c74865993894c564e6d8 Mon Sep 17 00:00:00 2001 +From: Thinkofdeath +Date: Wed, 30 Apr 2014 12:50:19 +0100 +Subject: [PATCH] Allow skull owners to be removed + + +diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaSkull.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaSkull.java +index 15e114d..247fef9 100644 +--- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaSkull.java ++++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaSkull.java +@@ -92,6 +92,12 @@ class CraftMetaSkull extends CraftMetaItem implements SkullMeta { + if (name != null && name.length() > MAX_OWNER_LENGTH) { + return false; + } ++ // Spigot start - Null = Remove skin ++ if (name == null) { ++ this.profile = null; ++ return true; ++ } ++ // Spigot end + + GameProfile profile = MinecraftServer.getServer().getUserCache().a(name); + if (profile == null) { +-- +1.9.1 +