use of net.minecraft.server.v1_8_R3.TileEntitySkull in project Denizen-For-Bukkit by DenizenScript.
the class BlockHelper_v1_11_R1 method setPlayerProfile.
@Override
public void setPlayerProfile(Skull skull, PlayerProfile playerProfile) {
GameProfile gameProfile = new GameProfile(playerProfile.getUniqueId(), playerProfile.getName());
if (playerProfile.hasTexture()) {
gameProfile.getProperties().put("textures", new Property("textures", playerProfile.getTexture(), playerProfile.getTextureSignature()));
}
TileEntitySkull tileEntity = ((CraftSkull) skull).getTileEntity();
tileEntity.setSkullType(SkullType.PLAYER.ordinal());
tileEntity.setGameProfile(gameProfile);
skull.getBlock().getState().update();
}
use of net.minecraft.server.v1_8_R3.TileEntitySkull in project Denizen-For-Bukkit by DenizenScript.
the class BlockHelper_v1_8_R3 method setPlayerProfile.
@Override
public void setPlayerProfile(Skull skull, PlayerProfile playerProfile) {
GameProfile gameProfile = new GameProfile(playerProfile.getUniqueId(), playerProfile.getName());
if (playerProfile.hasTexture()) {
gameProfile.getProperties().put("textures", new Property("textures", playerProfile.getTexture(), playerProfile.getTextureSignature()));
}
TileEntitySkull tileEntity = ((CraftSkull) skull).getTileEntity();
tileEntity.setSkullType(SkullType.PLAYER.ordinal());
tileEntity.setGameProfile(gameProfile);
skull.getBlock().getState().update();
}
use of net.minecraft.server.v1_8_R3.TileEntitySkull in project Denizen-For-Bukkit by DenizenScript.
the class BlockHelper_v1_9_R2 method setPlayerProfile.
@Override
public void setPlayerProfile(Skull skull, PlayerProfile playerProfile) {
GameProfile gameProfile = new GameProfile(playerProfile.getUniqueId(), playerProfile.getName());
if (playerProfile.hasTexture()) {
gameProfile.getProperties().put("textures", new Property("textures", playerProfile.getTexture(), playerProfile.getTextureSignature()));
}
TileEntitySkull tileEntity = ((CraftSkull) skull).getTileEntity();
tileEntity.setSkullType(SkullType.PLAYER.ordinal());
tileEntity.setGameProfile(gameProfile);
skull.getBlock().getState().update();
}
use of net.minecraft.server.v1_8_R3.TileEntitySkull in project Denizen-For-Bukkit by DenizenScript.
the class BlockHelper_v1_10_R1 method setPlayerProfile.
@Override
public void setPlayerProfile(Skull skull, PlayerProfile playerProfile) {
GameProfile gameProfile = new GameProfile(playerProfile.getUniqueId(), playerProfile.getName());
if (playerProfile.hasTexture()) {
gameProfile.getProperties().put("textures", new Property("textures", playerProfile.getTexture(), playerProfile.getTextureSignature()));
}
TileEntitySkull tileEntity = ((CraftSkull) skull).getTileEntity();
tileEntity.setSkullType(SkullType.PLAYER.ordinal());
tileEntity.setGameProfile(gameProfile);
skull.getBlock().getState().update();
}
Aggregations