Fix Skull BlockState setting illegal values on owner.

By: feildmaster <admin@feildmaster.com>
This commit is contained in:
CraftBukkit/Spigot 2012-12-24 14:32:08 -06:00
parent 28034e5c5c
commit 53d28c0e26

View file

@ -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 = "";
}
}