canBreak

abstract fun canBreak(player: OfflinePlayer, item: ItemStack, location: Location): Boolean

Checks if that OfflinePlayer can break a block at that Location using that ItemStack.

Return

If the player can break the block.

Parameters

player

The player trying to break the block.

item

The item to break the block with.

location

The location of the block.


open fun canBreak(tileEntity: TileEntity, item: ItemStack, location: Location): Boolean

Checks if that TileEntity can break a block at that Location using that ItemStack.

Return

If the tile-entity can break the block.

Parameters

tileEntity

The tile-entity trying to break the block.

item

The item to break the block with.

location

The location of the block.