BlockManager

interface BlockManager

Functions

Link copied to clipboard
abstract fun getBlock(location: Location): NovaBlockState
Gets the NovaBlockState at that location.
Link copied to clipboard
open fun getDrops(location: Location): List<ItemStack>
Gets the drops of the Nova block at that location or null if there is no Nova block there.
open fun getDrops(location: Location, tool: ItemStack): List<ItemStack>
Gets the drops of the Nova block at that location as if it was mined with the given tool or null if there is no Nova block there.
abstract fun getDrops(location: Location, source: Any, tool: ItemStack): List<ItemStack>
Gets the drops of the Nova block at that location as if it was mined by source with the given tool or null if there is no Nova block there.
Link copied to clipboard
abstract fun hasBlock(location: Location): Boolean
Checks if there is a NovaBlockState at that location.
Link copied to clipboard
open fun placeBlock(location: Location, block: NovaBlock)
open fun placeBlock(location: Location, block: NovaBlock, source: Any)
abstract fun placeBlock(location: Location, block: NovaBlock, source: Any, playSound: Boolean)
Places the block at that location.
open fun placeBlock(location: Location, material: NovaMaterial)
open fun placeBlock(location: Location, material: NovaMaterial, source: Any)
abstract fun placeBlock(location: Location, material: NovaMaterial, source: Any, playSound: Boolean)
Places the material at that location.
Link copied to clipboard
open fun removeBlock(location: Location): Boolean
Removes the Nova block at that location.
open fun removeBlock(location: Location, source: Any): Boolean
abstract fun removeBlock(location: Location, source: Any, breakEffects: Boolean): Boolean
open fun removeBlock(location: Location, source: Any, playSound: Boolean, showParticles: Boolean): Boolean
Removes the Nova block at that location as if it was destroyed by source.