summaryrefslogtreecommitdiffstats
path: root/src/main/java
diff options
context:
space:
mode:
authormd_5 <git@md-5.net>2016-06-01 21:39:14 +1000
committermd_5 <git@md-5.net>2016-06-03 20:38:40 +1000
commitc5bf6bc614bfd1e119e7fc067ff30cd8e8221cb2 (patch)
tree396287a547b45701581a869634ccb0d4457520ef /src/main/java
parent196238497b7aad6eabcf2413f2a95399a15c3d34 (diff)
downloadbukkit-c5bf6bc614bfd1e119e7fc067ff30cd8e8221cb2.tar
bukkit-c5bf6bc614bfd1e119e7fc067ff30cd8e8221cb2.tar.gz
bukkit-c5bf6bc614bfd1e119e7fc067ff30cd8e8221cb2.tar.lz
bukkit-c5bf6bc614bfd1e119e7fc067ff30cd8e8221cb2.tar.xz
bukkit-c5bf6bc614bfd1e119e7fc067ff30cd8e8221cb2.zip
SPIGOT-249: Set skull owner by UUID
Diffstat (limited to 'src/main/java')
-rw-r--r--src/main/java/org/bukkit/block/Skull.java22
1 files changed, 22 insertions, 0 deletions
diff --git a/src/main/java/org/bukkit/block/Skull.java b/src/main/java/org/bukkit/block/Skull.java
index 4f4896f8..7fbbc6be 100644
--- a/src/main/java/org/bukkit/block/Skull.java
+++ b/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,10 +33,28 @@ 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
*
* @return the rotation of the skull