Commits

md_5 authored 5d0b5b9c257
SPIGOT-3553: Add OfflinePlayer based methods to SkullMeta
No tags

src/main/java/org/bukkit/inventory/meta/SkullMeta.java

Modified
1 1 package org.bukkit.inventory.meta;
2 2
3 3 import org.bukkit.Material;
4 +import org.bukkit.OfflinePlayer;
4 5
5 6 /**
6 7 * Represents a skull ({@link Material#SKULL_ITEM}) that can have an owner.
7 8 */
8 9 public interface SkullMeta extends ItemMeta {
9 10
10 11 /**
11 12 * Gets the owner of the skull.
12 13 *
13 14 * @return the owner if the skull
15 + * @deprecated see {@link #setOwningPlayer(org.bukkit.OfflinePlayer)}.
14 16 */
17 + @Deprecated
15 18 String getOwner();
16 19
17 20 /**
18 21 * Checks to see if the skull has an owner.
19 22 *
20 23 * @return true if the skull has an owner
21 24 */
22 25 boolean hasOwner();
23 26
24 27 /**
25 28 * Sets the owner of the skull.
26 29 * <p>
27 30 * Plugins should check that hasOwner() returns true before calling this
28 31 * plugin.
29 32 *
30 33 * @param owner the new owner of the skull
31 34 * @return true if the owner was successfully set
35 + * @deprecated see {@link #setOwningPlayer(org.bukkit.OfflinePlayer)}.
32 36 */
37 + @Deprecated
33 38 boolean setOwner(String owner);
34 39
40 + /**
41 + * Gets the owner of the skull.
42 + *
43 + * @return the owner if the skull
44 + */
45 + OfflinePlayer getOwningPlayer();
46 +
47 + /**
48 + * Sets the owner of the skull.
49 + * <p>
50 + * Plugins should check that hasOwner() returns true before calling this
51 + * plugin.
52 + *
53 + * @param owner the new owner of the skull
54 + * @return true if the owner was successfully set
55 + */
56 + boolean setOwningPlayer(OfflinePlayer owner);
57 +
35 58 SkullMeta clone();
36 59 }

Everything looks good. We'll let you know here if there's anything you should know about.

Add shortcut