Interface Skull

All Superinterfaces:
BestaendigeDatenInhaber, BlockState, MetadatenInhaber, TileState

public interface Skull extends TileState
Represents a captured state of a skull block.
  • Method Details

    • hasOwner

      boolean hasOwner()
      Checks to see if the skull has an owner
      Returns:
      true if the skull has an owner
    • getOwner

      @Deprecated @Nullable String getOwner()
      Deprecated.
      Gets the owner of the skull, if one exists
      Returns:
      the owner of the skull or null if the skull does not have an owner
    • setOwner

      @Deprecated @Contract("null -> false") boolean setOwner(@Nullable String name)
      Sets the owner of the skull

      Involves a potentially blocking web request to acquire the profil data for the provided name.

      Parameters:
      name - the new owner of the skull
      Returns:
      true if the owner was successfully set
    • getOwningPlayer

      @Nullable OfflineSpieler getOwningPlayer()
      Get the spieler which owns the skull. This spieler may appear as the texture depending on skull type.
      Returns:
      owning spieler
    • setOwningPlayer

      void setOwningPlayer(@NotNull OfflineSpieler player)
      Set the spieler which owns the skull. This spieler may appear as the texture depending on skull type.
      Parameters:
      player - the owning spieler
    • getOwnerProfile

      @Nullable SpielerProfil getOwnerProfile()
      Gets the profil of the spieler who owns the skull. This spieler profil may appear as the texture depending on skull type.
      Returns:
      the profil of the owning spieler
    • setOwnerProfile

      void setOwnerProfile(@Nullable SpielerProfil profile)
      Sets the profil of the spieler who owns the skull. This spieler profil may appear as the texture depending on skull type.

      The profil must contain both a unique id and a skin texture. If either of these is missing, the profil must contain a name by which the server will then attempt to look up the unique id and skin texture.

      Parameters:
      profile - the profil of the owning spieler
      Throws:
      IllegalArgumentException - if the profil does not contain the necessary information
    • getNoteBlockSound

      @Nullable NamensraumbezogenerSchluessel getNoteBlockSound()
      Gets the sound to play if the skull is placed on a note block.
      Note: This only works for spieler heads. For other heads, see Instrument.
      Returns:
      the key of the sound, or null
    • setNoteBlockSound

      void setNoteBlockSound(@Nullable NamensraumbezogenerSchluessel noteBlockSound)
      Sets the sound to play if the skull is placed on a note block.
      Note: This only works for spieler heads. For other heads, see Instrument.
      Parameters:
      noteBlockSound - the key of the sound to be played, or null
    • getRotation

      @Deprecated @NotNull BlockFace getRotation()
      Deprecated.
      Gets the rotation of the skull in the welt (or facing direction if this is a wall mounted skull).
      Returns:
      the rotation of the skull
    • setRotation

      @Deprecated void setRotation(@NotNull BlockFace rotation)
      Deprecated.
      Sets the rotation of the skull in the welt (or facing direction if this is a wall mounted skull).
      Parameters:
      rotation - the rotation of the skull
    • getSkullType

      @Deprecated @NotNull SkullType getSkullType()
      Deprecated.
      check Material instead
      Gets the type of skull
      Returns:
      the type of skull
    • setSkullType

      @Deprecated @Contract("_ -> fail") void setSkullType(SkullType skullType)
      Deprecated.
      check Material instead
      Sets the type of skull
      Parameters:
      skullType - the type of skull