summaryrefslogtreecommitdiffstats
path: root/src/main/java
diff options
context:
space:
mode:
authorfeildmaster <admin@feildmaster.com>2012-12-24 14:32:08 -0600
committerfeildmaster <admin@feildmaster.com>2012-12-24 14:32:08 -0600
commitf726d07f1150e5cf6665ec40bccb2b2e2d265251 (patch)
treeb7ca19982477f387630c9d1dde9d533f3d017d98 /src/main/java
parent8292b73f3098be405d181522361f056932ff84be (diff)
downloadcraftbukkit-f726d07f1150e5cf6665ec40bccb2b2e2d265251.tar
craftbukkit-f726d07f1150e5cf6665ec40bccb2b2e2d265251.tar.gz
craftbukkit-f726d07f1150e5cf6665ec40bccb2b2e2d265251.tar.lz
craftbukkit-f726d07f1150e5cf6665ec40bccb2b2e2d265251.tar.xz
craftbukkit-f726d07f1150e5cf6665ec40bccb2b2e2d265251.zip
Fix Skull BlockState setting illegal values on owner.
Diffstat (limited to 'src/main/java')
-rw-r--r--src/main/java/org/bukkit/craftbukkit/block/CraftSkull.java4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/main/java/org/bukkit/craftbukkit/block/CraftSkull.java b/src/main/java/org/bukkit/craftbukkit/block/CraftSkull.java
index 2f2564f2..0f3e0d8f 100644
--- a/src/main/java/org/bukkit/craftbukkit/block/CraftSkull.java
+++ b/src/main/java/org/bukkit/craftbukkit/block/CraftSkull.java
@@ -148,7 +148,7 @@ public class CraftSkull extends CraftBlockState implements Skull {
}
public boolean setOwner(String name) {
- if (name != null && name.length() > MAX_OWNER_LENGTH) {
+ if (name == null || name.length() > MAX_OWNER_LENGTH) {
return false;
}
player = name;
@@ -176,7 +176,7 @@ public class CraftSkull extends CraftBlockState implements Skull {
this.skullType = skullType;
if (skullType != SkullType.PLAYER) {
- player = null;
+ player = "";
}
}