testserver/CraftBukkit-Patches/0141-Allow-skull-owners-to-...

27 lines
961 B
Diff

From 0b7f5bbb1d880be6abfe53e2b9fc1a412b28b265 Mon Sep 17 00:00:00 2001
From: Thinkofdeath <thethinkofdeath@gmail.com>
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 2fe1000..55d1ccf 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
if (name == null) {
profile = null;
--
1.9.1