Class SkullMock

All Implemented Interfaces:
org.bukkit.block.BlockState, org.bukkit.block.Skull, org.bukkit.block.TileState, org.bukkit.metadata.Metadatable, org.bukkit.persistence.PersistentDataHolder

public class SkullMock extends TileStateMock implements org.bukkit.block.Skull
Mock implementation of a Skull.
See Also:
  • Constructor Details

    • SkullMock

      public SkullMock(@NotNull @NotNull org.bukkit.Material material)
      Constructs a new SkullMock for the provided Material. Only supports materials in MaterialTags.SKULLS
      Parameters:
      material - The material this state is for.
    • SkullMock

      protected SkullMock(@NotNull @NotNull org.bukkit.block.Block block)
      Constructs a new SkullMock for the provided Block. Only supports materials in MaterialTags.SKULLS
      Parameters:
      block - The block this state is for.
    • SkullMock

      protected SkullMock(@NotNull @NotNull SkullMock state)
      Constructs a new SkullMock by cloning the data from an existing one.
      Parameters:
      state - The state to clone.
  • Method Details

    • getSnapshot

      @NotNull public @NotNull org.bukkit.block.BlockState getSnapshot()
      Description copied from class: BlockStateMock
      This returns a copy of this BlockStateMock. Inheritents of this class should override this method!
      Specified by:
      getSnapshot in class TileStateMock
      Returns:
      A snapshot of this BlockStateMock.
    • hasOwner

      public boolean hasOwner()
      Specified by:
      hasOwner in interface org.bukkit.block.Skull
    • getOwner

      @Nullable public @Nullable String getOwner()
      Specified by:
      getOwner in interface org.bukkit.block.Skull
    • setOwner

      public boolean setOwner(@Nullable @Nullable String name)
      Specified by:
      setOwner in interface org.bukkit.block.Skull
    • getOwningPlayer

      @Nullable public @Nullable org.bukkit.OfflinePlayer getOwningPlayer()
      Specified by:
      getOwningPlayer in interface org.bukkit.block.Skull
    • setOwningPlayer

      public void setOwningPlayer(@NotNull @NotNull org.bukkit.OfflinePlayer player)
      Specified by:
      setOwningPlayer in interface org.bukkit.block.Skull
    • setPlayerProfile

      public void setPlayerProfile(@NotNull @NotNull com.destroystokyo.paper.profile.PlayerProfile profile)
      Specified by:
      setPlayerProfile in interface org.bukkit.block.Skull
    • getPlayerProfile

      @Nullable public @Nullable com.destroystokyo.paper.profile.PlayerProfile getPlayerProfile()
      Specified by:
      getPlayerProfile in interface org.bukkit.block.Skull
    • getOwnerProfile

      @Deprecated(since="1.18") public @Nullable org.bukkit.profile.PlayerProfile getOwnerProfile()
      Deprecated.
      Specified by:
      getOwnerProfile in interface org.bukkit.block.Skull
    • setOwnerProfile

      @Deprecated(since="1.18") public void setOwnerProfile(@Nullable org.bukkit.profile.PlayerProfile profile)
      Deprecated.
      Specified by:
      setOwnerProfile in interface org.bukkit.block.Skull
    • getNoteBlockSound

      @Nullable public @Nullable org.bukkit.NamespacedKey getNoteBlockSound()
      Specified by:
      getNoteBlockSound in interface org.bukkit.block.Skull
    • setNoteBlockSound

      public void setNoteBlockSound(@Nullable @Nullable org.bukkit.NamespacedKey noteBlockSound)
      Specified by:
      setNoteBlockSound in interface org.bukkit.block.Skull
    • getRotation

      @NotNull public @NotNull org.bukkit.block.BlockFace getRotation()
      Specified by:
      getRotation in interface org.bukkit.block.Skull
    • setRotation

      public void setRotation(@NotNull @NotNull org.bukkit.block.BlockFace rotation)
      Specified by:
      setRotation in interface org.bukkit.block.Skull
    • getSkullType

      @Deprecated(since="1.13") @NotNull public @NotNull org.bukkit.SkullType getSkullType()
      Deprecated.
      Specified by:
      getSkullType in interface org.bukkit.block.Skull
    • setSkullType

      @Deprecated(since="1.13") public void setSkullType(org.bukkit.SkullType skullType)
      Deprecated.
      Specified by:
      setSkullType in interface org.bukkit.block.Skull