Class EnchantingTableMock

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

public class EnchantingTableMock extends TileStateMock implements org.bukkit.block.EnchantingTable
Mock implementation of an EnchantingTable.
See Also:
  • Constructor Details

    • EnchantingTableMock

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

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

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

      @Nullable public @Nullable net.kyori.adventure.text.Component customName()
      Specified by:
      customName in interface org.bukkit.Nameable
    • customName

      public void customName(@Nullable @Nullable net.kyori.adventure.text.Component customName)
      Specified by:
      customName in interface org.bukkit.Nameable
    • getCustomName

      @Nullable public @Nullable String getCustomName()
      Specified by:
      getCustomName in interface org.bukkit.Nameable
    • setCustomName

      public void setCustomName(@Nullable @Nullable String name)
      Specified by:
      setCustomName in interface org.bukkit.Nameable