Class EnchantingTableStateMock
java.lang.Object
org.mockbukkit.mockbukkit.block.state.BlockStateMock
org.mockbukkit.mockbukkit.block.state.TileStateMock
org.mockbukkit.mockbukkit.block.state.EnchantingTableStateMock
- All Implemented Interfaces:
PersistentDataViewHolder,BlockState,EnchantingTable,TileState,Metadatable,Nameable,PersistentDataHolder
Mock implementation of an
EnchantingTable.- See Also:
-
Constructor Summary
ConstructorsModifierConstructorDescriptionEnchantingTableStateMock(@NotNull Material material) Constructs a newEnchantingTableStateMockfor the providedMaterial.protectedEnchantingTableStateMock(@NotNull Block block) Constructs a newEnchantingTableStateMockfor the providedBlock.protectedEnchantingTableStateMock(@NotNull EnchantingTableStateMock state) Constructs a newEnchantingTableStateMockby cloning the data from an existing one. -
Method Summary
Modifier and TypeMethodDescription@NotNull EnchantingTableStateMockcopy()This returns a copy of thisBlockStateMock.@Nullable net.kyori.adventure.text.ComponentvoidcustomName(@Nullable net.kyori.adventure.text.Component customName) @Nullable String@NotNull EnchantingTableStateMockThis returns a copy of thisBlockStateMock.voidsetCustomName(@Nullable String name) protected StringProvides the contents ofBlockStateMock.toString().Methods inherited from class org.mockbukkit.mockbukkit.block.state.TileStateMock
equals, getPersistentDataContainer, hashCode, isSnapshotMethods inherited from class org.mockbukkit.mockbukkit.block.state.BlockStateMock
checkType, checkType, checkType, checkType, copy, getBlock, getBlockData, getChunk, getData, getDrops, getDrops, getDrops, getLightLevel, getLocation, getLocation, getMetadata, getRawData, getType, getWorld, getX, getY, getZ, hasMetadata, isCollidable, isPlaced, mockState, mockState, removeMetadata, setBlockData, setData, setMetadata, setRawData, setType, toString, update, update, updateMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface org.bukkit.block.BlockState
copy, getBlock, getBlockData, getChunk, getData, getDrops, getDrops, getDrops, getLightLevel, getLocation, getLocation, getRawData, getType, getWorld, getX, getY, getZ, isCollidable, isPlaced, setBlockData, setData, setRawData, setType, update, update, updateMethods inherited from interface org.bukkit.metadata.Metadatable
getMetadata, hasMetadata, removeMetadata, setMetadataMethods inherited from interface org.bukkit.block.TileState
getPersistentDataContainer, isSnapshot
-
Constructor Details
-
EnchantingTableStateMock
Constructs a newEnchantingTableStateMockfor the providedMaterial. Only supportsMaterial.ENCHANTING_TABLE- Parameters:
material- The material this state is for.
-
EnchantingTableStateMock
Constructs a newEnchantingTableStateMockfor the providedBlock. Only supportsMaterial.ENCHANTING_TABLE- Parameters:
block- The block this state is for.
-
EnchantingTableStateMock
Constructs a newEnchantingTableStateMockby cloning the data from an existing one.- Parameters:
state- The state to clone.
-
-
Method Details
-
getSnapshot
Description copied from class:BlockStateMockThis returns a copy of thisBlockStateMock. Inheriters of this class must override this method!- Specified by:
getSnapshotin classTileStateMock- Returns:
- A snapshot of this
BlockStateMock.
-
copy
Description copied from class:BlockStateMockThis returns a copy of thisBlockStateMock. Inheriters of this class must override this method!- Specified by:
copyin interfaceBlockState- Overrides:
copyin classBlockStateMock- Returns:
- A copy of this
BlockStateMock.
-
customName
@Nullable public @Nullable net.kyori.adventure.text.Component customName()- Specified by:
customNamein interfaceNameable
-
customName
public void customName(@Nullable @Nullable net.kyori.adventure.text.Component customName) - Specified by:
customNamein interfaceNameable
-
getCustomName
- Specified by:
getCustomNamein interfaceNameable
-
setCustomName
- Specified by:
setCustomNamein interfaceNameable
-
toStringInternal
Description copied from class:BlockStateMockProvides the contents ofBlockStateMock.toString().Implementors must call super as in the following example.
@Override protected String toStringInternal() { return super.toStringInternal() + ", member1=" + member1 + ", member2=" + member2; }- Overrides:
toStringInternalin classTileStateMock- Returns:
- Comma separated list of properties and values.
-