Interface CustomBlock
- All Superinterfaces:
- Metadatable,- PersistentStorage.Holder,- SpecialBlock
A type created for devs being able to create custom blocks with custom handler
 Use 
SpecialBlockAddEvent if you're looking to remove it when you think that the conditions aren't met
 (like when e.g. the material of the block isn't the needed one)- 
Nested Class SummaryNested ClassesModifier and TypeInterfaceDescriptionstatic interfaceThe handler for custom SpecialBlocks (CustomBlock)
- 
Method SummaryModifier and TypeMethodDescriptionReturns the handler of this CustomBlock.getId()Returns the type id of this custom block.
 A plugin might have custom blocks but it's also important to be able to distinguish themdefault booleanReturns if a handler has been set for this block withsetHandler(Handler)voidsetHandler(CustomBlock.Handler handler) Set the handler of this CustomBlock.voidSet the type id of this custom block.
 A plugin might have custom blocks but it's also important to be able to distinguish themMethods inherited from interface org.bukkit.metadata.MetadatablegetMetadata, hasMetadata, removeMetadata, setMetadataMethods inherited from interface de.marcely.bedwars.tools.PersistentStorage.HoldergetPersistentStorageMethods inherited from interface de.marcely.bedwars.api.world.block.SpecialBlockasBukkit, asBukkitAsync, exists, getType, getWorld, getX, getY, getZ, onInteract, remove, update
- 
Method Details- 
getIdString getId()Returns the type id of this custom block.
 A plugin might have custom blocks but it's also important to be able to distinguish them- Returns:
- The type id of this custom block
 
- 
setIdSet the type id of this custom block.
 A plugin might have custom blocks but it's also important to be able to distinguish them- Parameters:
- id- The new type id
 
- 
getHandlerReturns the handler of this CustomBlock. The handler is responsible for adding live to the block- Returns:
- The set handler. nullwhenhasHandler()returns false
 
- 
setHandlerSet the handler of this CustomBlock. The handler is responsible for adding live to the block- Parameters:
- handler- The new handler.- nullto remove the handler
 
- 
hasHandlerdefault boolean hasHandler()Returns if a handler has been set for this block withsetHandler(Handler)- Returns:
- If a handler has been set
 
 
-