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:
Beacon,BlockState,Lockable,TileState,Metadatable,Nameable,PersistentDataHolder
-
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedBeaconMock(@NotNull BeaconMock state) protectedBeaconMock(@NotNull Block block) BeaconMock(@NotNull Material material) -
Method Summary
Modifier and TypeMethodDescription@Nullable net.kyori.adventure.text.ComponentvoidcustomName(@Nullable net.kyori.adventure.text.Component customName) @Nullable Stringdouble@NotNull Collection<LivingEntity>@NotNull StringgetLock()@Nullable PotionEffect@Nullable PotionEffect@NotNull BlockStateThis returns a copy of thisBlockStateMock.intgetTier()booleanisLocked()voidvoidsetCustomName(@Nullable String name) voidsetEffectRange(double range) voidvoidsetPrimaryEffect(@Nullable PotionEffectType effect) voidsetSecondaryEffect(@Nullable 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, equals, getBlock, getBlockData, getChunk, getData, 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
getBlock, getBlockData, getChunk, getData, 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
-
BeaconMock
-
BeaconMock
-
-
Method Details
-
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 interfaceBeacon
-
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() -
getPrimaryEffect
- Specified by:
getPrimaryEffectin interfaceBeacon
-
setPrimaryEffect
- Specified by:
setPrimaryEffectin interfaceBeacon
-
getSecondaryEffect
- Specified by:
getSecondaryEffectin interfaceBeacon
-
setSecondaryEffect
- Specified by:
setSecondaryEffectin interfaceBeacon
-
getEffectRange
public double getEffectRange()- Specified by:
getEffectRangein interfaceBeacon
-
setEffectRange
public void setEffectRange(double range) - Specified by:
setEffectRangein interfaceBeacon
-
resetEffectRange
public void resetEffectRange()- Specified by:
resetEffectRangein interfaceBeacon
-
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
-
isLocked
public boolean isLocked() -
getLock
-
setLock
-