Class BedMock

All Implemented Interfaces:
org.bukkit.block.Bed, org.bukkit.block.BlockState, org.bukkit.block.TileState, org.bukkit.material.Colorable, org.bukkit.metadata.Metadatable, org.bukkit.persistence.PersistentDataHolder

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

    • BedMock

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

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

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

    • getColor

      @Nullable public @Nullable org.bukkit.DyeColor getColor()
      Specified by:
      getColor in interface org.bukkit.block.Bed
      Specified by:
      getColor in interface org.bukkit.material.Colorable
    • setColor

      @Deprecated(forRemoval=true, since="1.19") public void setColor(org.bukkit.DyeColor color)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Specified by:
      setColor in interface org.bukkit.block.Bed
      Specified by:
      setColor in interface org.bukkit.material.Colorable
    • 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.