From 5b252941b06f3cd2eee17613abdffdfe694d8f1b Mon Sep 17 00:00:00 2001 From: CraftBukkit/Spigot Date: Mon, 12 May 2014 23:19:22 -0500 Subject: [PATCH] Only set skull profile if it is a player skull. Fixes BUKKIT-5605 By: Travis Watkins --- .../org/bukkit/craftbukkit/block/CraftSkull.java | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/block/CraftSkull.java b/paper-server/src/main/java/org/bukkit/craftbukkit/block/CraftSkull.java index 4e0620e56..8ebb22cf4 100644 --- a/paper-server/src/main/java/org/bukkit/craftbukkit/block/CraftSkull.java +++ b/paper-server/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(); }