From 44956ed250e4710397a50b2db011e6711f51d4a6 Mon Sep 17 00:00:00 2001 From: Bukkit/Spigot Date: Wed, 1 Jun 2016 21:39:14 +1000 Subject: [PATCH] SPIGOT-249: Set skull owner by UUID By: md_5 --- .../src/main/java/org/bukkit/block/Skull.java | 22 +++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/paper-api/src/main/java/org/bukkit/block/Skull.java b/paper-api/src/main/java/org/bukkit/block/Skull.java index 4f4896f843..7fbbc6be8c 100644 --- a/paper-api/src/main/java/org/bukkit/block/Skull.java +++ b/paper-api/src/main/java/org/bukkit/block/Skull.java @@ -1,5 +1,7 @@ package org.bukkit.block; +import java.util.UUID; +import org.bukkit.OfflinePlayer; import org.bukkit.SkullType; /** @@ -18,7 +20,9 @@ public interface Skull extends BlockState { * Gets the owner of the skull, if one exists * * @return the owner of the skull or null if the skull does not have an owner + * @deprecated See {@link #getOwningPlayer()}. */ + @Deprecated public String getOwner(); /** @@ -29,9 +33,27 @@ public interface Skull extends BlockState { * * @param name the new owner of the skull * @return true if the owner was successfully set + * @deprecated see {@link #setOwningPlayer(org.bukkit.OfflinePlayer)}. */ + @Deprecated public boolean setOwner(String name); + /** + * Get the player which owns the skull. This player may appear as the + * texture depending on skull type. + * + * @return owning player + */ + public OfflinePlayer getOwningPlayer(); + + /** + * Set the player which owns the skull. This player may appear as the + * texture depending on skull type. + * + * @param player the owning player + */ + public void setOwningPlayer(OfflinePlayer player); + /** * Gets the rotation of the skull in the world *