Class BeaconMock
java.lang.Object
be.seeseemelk.mockbukkit.block.state.BlockStateMock
be.seeseemelk.mockbukkit.block.state.TileStateMock
be.seeseemelk.mockbukkit.block.state.BeaconMock
- All Implemented Interfaces:
io.papermc.paper.block.LockableTileState,org.bukkit.block.Beacon,org.bukkit.block.BlockState,org.bukkit.block.Lockable,org.bukkit.block.TileState,org.bukkit.metadata.Metadatable,org.bukkit.Nameable,org.bukkit.persistence.PersistentDataHolder
Mock implementation of a
Beacon.- See Also:
-
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedBeaconMock(@NotNull BeaconMock state) Constructs a newBeaconMockby cloning the data from an existing one.BeaconMock(@NotNull org.bukkit.Material material) Constructs a newBeaconMockfor the providedMaterial.protectedBeaconMock(@NotNull org.bukkit.block.Block block) Constructs a newBeaconMockfor the providedBlock. -
Method Summary
Modifier and TypeMethodDescription@Nullable net.kyori.adventure.text.ComponentvoidcustomName(@Nullable net.kyori.adventure.text.Component customName) @Nullable Stringdouble@NotNull Collection<org.bukkit.entity.LivingEntity> @NotNull StringgetLock()@Nullable org.bukkit.potion.PotionEffect@Nullable org.bukkit.potion.PotionEffect@NotNull org.bukkit.block.BlockStateThis returns a copy of thisBlockStateMock.intgetTier()booleanisLocked()voidvoidsetCustomName(@Nullable String name) voidsetEffectRange(double range) voidvoidsetPrimaryEffect(@Nullable org.bukkit.potion.PotionEffectType effect) voidsetSecondaryEffect(@Nullable org.bukkit.potion.PotionEffectType effect) voidsetTier(int tier) Sets the tier of the Beacon.voidCalculates the Beacon's tier based off the blocks below it, just as in vanilla.Methods inherited from class be.seeseemelk.mockbukkit.block.state.TileStateMock
getPersistentDataContainer, isSnapshotMethods inherited from class be.seeseemelk.mockbukkit.block.state.BlockStateMock
checkType, checkType, checkType, checkType, copy, copy, equals, getBlock, getBlockData, getChunk, getData, getDrops, getDrops, getDrops, getLightLevel, getLocation, getLocation, getMetadata, getRawData, getType, getWorld, getX, getY, getZ, hashCode, hasMetadata, isCollidable, isPlaced, mockState, removeMetadata, setBlockData, setData, setMetadata, setRawData, setType, update, update, updateMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.bukkit.block.BlockState
copy, 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
-
BeaconMock
public BeaconMock(@NotNull @NotNull org.bukkit.Material material) - Parameters:
material- The material this state is for.
-
BeaconMock
protected BeaconMock(@NotNull @NotNull org.bukkit.block.Block block) - Parameters:
block- The block this state is for.
-
BeaconMock
Constructs a newBeaconMockby 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:BlockStateMockThis returns a copy of thisBlockStateMock. Inheritents of this class should override this method!- Specified by:
getSnapshotin classTileStateMock- Returns:
- A snapshot of this
BlockStateMock.
-
getEntitiesInRange
- Specified by:
getEntitiesInRangein interfaceorg.bukkit.block.Beacon
-
updateTier
public void updateTier()Calculates the Beacon's tier based off the blocks below it, just as in vanilla. -
setTier
@Test public void setTier(int tier) Sets the tier of the Beacon. Clamped between 1-4 (inclusive).- Parameters:
tier- The tier to set.
-
getTier
public int getTier()- Specified by:
getTierin interfaceorg.bukkit.block.Beacon
-
getPrimaryEffect
@Nullable public @Nullable org.bukkit.potion.PotionEffect getPrimaryEffect()- Specified by:
getPrimaryEffectin interfaceorg.bukkit.block.Beacon
-
setPrimaryEffect
public void setPrimaryEffect(@Nullable @Nullable org.bukkit.potion.PotionEffectType effect) - Specified by:
setPrimaryEffectin interfaceorg.bukkit.block.Beacon
-
getSecondaryEffect
@Nullable public @Nullable org.bukkit.potion.PotionEffect getSecondaryEffect()- Specified by:
getSecondaryEffectin interfaceorg.bukkit.block.Beacon
-
setSecondaryEffect
public void setSecondaryEffect(@Nullable @Nullable org.bukkit.potion.PotionEffectType effect) - Specified by:
setSecondaryEffectin interfaceorg.bukkit.block.Beacon
-
getEffectRange
public double getEffectRange()- Specified by:
getEffectRangein interfaceorg.bukkit.block.Beacon
-
setEffectRange
public void setEffectRange(double range) - Specified by:
setEffectRangein interfaceorg.bukkit.block.Beacon
-
resetEffectRange
public void resetEffectRange()- Specified by:
resetEffectRangein interfaceorg.bukkit.block.Beacon
-
customName
@Nullable public @Nullable net.kyori.adventure.text.Component customName()- Specified by:
customNamein interfaceorg.bukkit.Nameable
-
customName
public void customName(@Nullable @Nullable net.kyori.adventure.text.Component customName) - Specified by:
customNamein interfaceorg.bukkit.Nameable
-
getCustomName
- Specified by:
getCustomNamein interfaceorg.bukkit.Nameable
-
setCustomName
- Specified by:
setCustomNamein interfaceorg.bukkit.Nameable
-
isLocked
public boolean isLocked()- Specified by:
isLockedin interfaceorg.bukkit.block.Lockable
-
getLock
- Specified by:
getLockin interfaceorg.bukkit.block.Lockable
-
setLock
- Specified by:
setLockin interfaceorg.bukkit.block.Lockable
-