BlockManager

interface BlockManager

Functions

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