diff options
author | Travis Watkins <amaranth@ubuntu.com> | 2014-05-12 23:19:22 -0500 |
---|---|---|
committer | Travis Watkins <amaranth@ubuntu.com> | 2014-05-12 23:22:04 -0500 |
commit | 5610337b4fa0ab7d8217ecfdc25231d10d572ab4 (patch) | |
tree | a153b6d9bf8701e07d952dcf8c86ff398505e739 /src/main/java/org/bukkit | |
parent | 690a908b971e327c5f77ed73d8d52a7556570afd (diff) | |
download | craftbukkit-5610337b4fa0ab7d8217ecfdc25231d10d572ab4.tar craftbukkit-5610337b4fa0ab7d8217ecfdc25231d10d572ab4.tar.gz craftbukkit-5610337b4fa0ab7d8217ecfdc25231d10d572ab4.tar.lz craftbukkit-5610337b4fa0ab7d8217ecfdc25231d10d572ab4.tar.xz craftbukkit-5610337b4fa0ab7d8217ecfdc25231d10d572ab4.zip |
Only set skull profile if it is a player skull. Fixes BUKKIT-5605
Diffstat (limited to 'src/main/java/org/bukkit')
-rw-r--r-- | src/main/java/org/bukkit/craftbukkit/block/CraftSkull.java | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/src/main/java/org/bukkit/craftbukkit/block/CraftSkull.java b/src/main/java/org/bukkit/craftbukkit/block/CraftSkull.java index 4e0620e5..8ebb22cf 100644 --- a/src/main/java/org/bukkit/craftbukkit/block/CraftSkull.java +++ b/src/main/java/org/bukkit/craftbukkit/block/CraftSkull.java @@ -2,16 +2,13 @@ package org.bukkit.craftbukkit.block; import net.minecraft.server.MinecraftServer; import net.minecraft.server.TileEntitySkull; - import net.minecraft.util.com.mojang.authlib.GameProfile; -import org.bukkit.OfflinePlayer; + import org.bukkit.SkullType; import org.bukkit.block.Block; import org.bukkit.block.BlockFace; import org.bukkit.block.Skull; -import org.bukkit.craftbukkit.CraftOfflinePlayer; import org.bukkit.craftbukkit.CraftWorld; -import org.bukkit.craftbukkit.entity.CraftPlayer; public class CraftSkull extends CraftBlockState implements Skull { private static final int MAX_OWNER_LENGTH = 16; @@ -193,8 +190,12 @@ public class CraftSkull extends CraftBlockState implements Skull { boolean result = super.update(force, applyPhysics); if (result) { - skull.setSkullType(getSkullType(skullType)); - skull.setGameProfile(profile); + if (skullType == SkullType.PLAYER) { + skull.setGameProfile(profile); + } else { + skull.setSkullType(getSkullType(skullType)); + } + skull.setRotation(rotation); skull.update(); } |