Interface SpecialBlock
- All Superinterfaces:
- Metadatable,- PersistentStorage.Holder
- All Known Subinterfaces:
- CustomBlock,- JoinArenaSignBlock,- RankingSignBlock,- RankingSkullBlock
A SpecialBlock represents a normal block with special (maybe even interactable) features.
 
 They get automatically saved and loaded and it's possible to create custom variants using CustomBlock
- 
Method SummaryModifier and TypeMethodDescriptionasBukkit()Returns Bukkit's variant of the block that's located at the same location as this onevoidasBukkitAsync(Consumer<Block> callback) Returns Bukkit's variant of the block that's located at the same location as this one.booleanexists()Returns if this block is still existing inside its WorldStorage.
 Keep in mind that this varies per instance and that this instance is forever garbage when it returns falsegetType()SpecialBlocks vary from the type they represent.getWorld()Returns the world to which this block initially was added.
 Keep in mind that the block might have been removed.intgetX()Returns the x coordinate of this blockshortgetY()Returns the y coordinate of this blockintgetZ()Returns the z coordinate of this blockvoidonInteract(Player player, PlayerInteractEvent parentEvent) Call this if you want to simulate an interaction of the playerbooleanremove()Tries to remove this block from its WorldStoragevoidupdate()Tries to apply the given informations into the game world.
 By this e.g. a sign gets updated with the newly changed statsMethods inherited from interface org.bukkit.metadata.MetadatablegetMetadata, hasMetadata, removeMetadata, setMetadataMethods inherited from interface de.marcely.bedwars.tools.PersistentStorage.HoldergetPersistentStorage
- 
Method Details- 
getTypeBlockType getType()SpecialBlocks vary from the type they represent. You may cast to the corresponding type after matching its type- Returns:
- The type of this SpecialBlock
 
- 
getWorldWorldStorage getWorld()Returns the world to which this block initially was added.
 Keep in mind that the block might have been removed. You can verify it by callingexists()- Returns:
- The world to which this block was added to
 
- 
asBukkitBlock asBukkit()Returns Bukkit's variant of the block that's located at the same location as this one- Returns:
- The Block located at the same location as this one
 
- 
asBukkitAsyncReturns Bukkit's variant of the block that's located at the same location as this one.If supported, it will uses paper's async chunk loading feature. - Parameters:
- callback- The callback that is being called on the main thread
 
- 
getXint getX()Returns the x coordinate of this block- Returns:
- The x coordinate
 
- 
getYshort getY()Returns the y coordinate of this block- Returns:
- The y coordinate
 
- 
getZint getZ()Returns the z coordinate of this block- Returns:
- The z coordinate
 
- 
updatevoid update()Tries to apply the given informations into the game world.
 By this e.g. a sign gets updated with the newly changed stats
- 
onInteractCall this if you want to simulate an interaction of the player- Parameters:
- player- The player who clicked on the sign
- parentEvent- The event which might contain info needed for the block
 
- 
existsboolean exists()Returns if this block is still existing inside its WorldStorage.
 Keep in mind that this varies per instance and that this instance is forever garbage when it returns false- Returns:
- If this block still exists
 
- 
removeboolean remove()Tries to remove this block from its WorldStorage- Returns:
- falsewhen it already has been removed. Otherwise true
 
 
-