Commits
Travis Watkins authored 1cab5e5edc6
1 1 | package org.bukkit.block; |
2 2 | |
3 - | import org.bukkit.OfflinePlayer; |
4 3 | import org.bukkit.SkullType; |
5 4 | |
6 - | import java.util.UUID; |
7 - | |
8 5 | /** |
9 6 | * Represents a Skull |
10 7 | */ |
11 8 | public interface Skull extends BlockState { |
12 9 | |
13 10 | /** |
14 11 | * Checks to see if the skull has an owner |
15 12 | * |
16 13 | * @return true if the skull has an owner |
17 14 | */ |
18 15 | public boolean hasOwner(); |
19 16 | |
20 17 | /** |
21 - | * Gets the owner of the skull |
18 + | * Gets the owner of the skull, if one exists |
22 19 | * |
23 - | * @return the owner of the skull or null if the profile does not have a name |
24 - | * @deprecated Skulls no longer store player names, they store profiles |
25 - | * @see #getPlayer() |
20 + | * @return the owner of the skull or null if the skull does not have an owner |
26 21 | */ |
27 - | |
28 22 | public String getOwner(); |
29 23 | |
30 24 | /** |
31 - | * Does nothing |
25 + | * Sets the owner of the skull |
26 + | * <p> |
27 + | * Involves a potentially blocking web request to acquire the profile data for |
28 + | * the provided name. |
32 29 | * |
33 30 | * @param name the new owner of the skull |
34 31 | * @return true if the owner was successfully set |
35 - | * @deprecated Skulls no longer store player names, they store profiles |
36 - | * @see #setPlayer(org.bukkit.OfflinePlayer) |
37 32 | */ |
38 - | |
39 33 | public boolean setOwner(String name); |
40 34 | |
41 - | /** |
42 - | * Gets the owner of the skull, if one exists |
43 - | * |
44 - | * @return the owner of the skull or null if this skull does not have an owner |
45 - | */ |
46 - | public OfflinePlayer getPlayer(); |
47 - | |
48 - | /** |
49 - | * Sets the owner of the skull to this player |
50 - | * <p> |
51 - | * If the owner does not contain all the needed data for the skull a call to |
52 - | * {@link #update()} may potentially involve a blocking web request to acquire |
53 - | * the missing data. |
54 - | * |
55 - | * @param player the new owner of the skull |
56 - | * @return true if the owner was successfully set |
57 - | */ |
58 - | public boolean setPlayer(OfflinePlayer player); |
59 - | |
60 35 | /** |
61 36 | * Gets the rotation of the skull in the world |
62 37 | * |
63 38 | * @return the rotation of the skull |
64 39 | */ |
65 40 | public BlockFace getRotation(); |
66 41 | |
67 42 | /** |
68 43 | * Sets the rotation of the skull in the world |
69 44 | * |