001 package org.bukkit.block;
002
003 import org.bukkit.SkullType;
004
005 /**
006 * Represents a Skull
007 */
008 public interface Skull extends BlockState {
009
010 /**
011 * Checks to see if the skull has an owner
012 *
013 * @return true if the skull has an owner
014 */
015 public boolean hasOwner();
016
017 /**
018 * Gets the owner of the skull, if one exists
019 *
020 * @return the owner of the skull or null if the skull does not have an owner
021 */
022 public String getOwner();
023
024 /**
025 * Sets the owner of the skull
026 * <p>
027 * Involves a potentially blocking web request to acquire the profile data for
028 * the provided name.
029 *
030 * @param name the new owner of the skull
031 * @return true if the owner was successfully set
032 */
033 public boolean setOwner(String name);
034
035 /**
036 * Gets the rotation of the skull in the world
037 *
038 * @return the rotation of the skull
039 */
040 public BlockFace getRotation();
041
042 /**
043 * Sets the rotation of the skull in the world
044 *
045 * @param rotation the rotation of the skull
046 */
047 public void setRotation(BlockFace rotation);
048
049 /**
050 * Gets the type of skull
051 *
052 * @return the type of skull
053 */
054 public SkullType getSkullType();
055
056 /**
057 * Sets the type of skull
058 *
059 * @param skullType the type of skull
060 */
061 public void setSkullType(SkullType skullType);
062 }