Class JukeboxMock

All Implemented Interfaces:
org.bukkit.block.BlockState, org.bukkit.block.Jukebox, org.bukkit.block.TileState, org.bukkit.inventory.BlockInventoryHolder, org.bukkit.inventory.InventoryHolder, org.bukkit.metadata.Metadatable, org.bukkit.persistence.PersistentDataHolder

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

    • JukeboxMock

      public JukeboxMock(@NotNull @NotNull org.bukkit.Material material)
      Constructs a new JukeboxMock for the provided Material. Only supports Material.JUKEBOX
      Parameters:
      material - The material this state is for.
    • JukeboxMock

      protected JukeboxMock(@NotNull @NotNull org.bukkit.block.Block block)
      Constructs a new JukeboxMock for the provided Block. Only supports Material.JUKEBOX
      Parameters:
      block - The block this state is for.
    • JukeboxMock

      protected JukeboxMock(@NotNull @NotNull JukeboxMock state)
      Constructs a new JukeboxMock 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.
    • getPlaying

      @NotNull public @NotNull org.bukkit.Material getPlaying()
      Specified by:
      getPlaying in interface org.bukkit.block.Jukebox
    • setPlaying

      public void setPlaying(@Nullable @Nullable org.bukkit.Material recordType)
      Specified by:
      setPlaying in interface org.bukkit.block.Jukebox
    • hasRecord

      public boolean hasRecord()
      Specified by:
      hasRecord in interface org.bukkit.block.Jukebox
    • getRecord

      @NotNull public @NotNull org.bukkit.inventory.ItemStack getRecord()
      Specified by:
      getRecord in interface org.bukkit.block.Jukebox
    • setRecord

      public void setRecord(@Nullable @Nullable org.bukkit.inventory.ItemStack recordItem)
      Specified by:
      setRecord in interface org.bukkit.block.Jukebox
    • isPlaying

      public boolean isPlaying()
      Specified by:
      isPlaying in interface org.bukkit.block.Jukebox
    • startPlaying

      public boolean startPlaying()
      Specified by:
      startPlaying in interface org.bukkit.block.Jukebox
    • stopPlaying

      public void stopPlaying()
      Specified by:
      stopPlaying in interface org.bukkit.block.Jukebox
    • eject

      public boolean eject()
      Specified by:
      eject in interface org.bukkit.block.Jukebox
    • getInventory

      @NotNull public @NotNull org.bukkit.inventory.JukeboxInventory getInventory()
      Specified by:
      getInventory in interface org.bukkit.inventory.InventoryHolder
      Specified by:
      getInventory in interface org.bukkit.block.Jukebox
    • getSnapshotInventory

      @NotNull public @NotNull org.bukkit.inventory.JukeboxInventory getSnapshotInventory()
      Specified by:
      getSnapshotInventory in interface org.bukkit.block.Jukebox