canUseBlock

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

Checks if the OfflinePlayer can interact with a block at that Location using that ItemStack.

Return

If the player can interact with the block.

Parameters

player

The player trying to interact with the block.

item

The item used to interact with the block.

location

The location of the block.


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

Checks if the TileEntity can interact with a block at that Location using that ItemStack.

Return

If the tile-entity can interact with the block.

Parameters

tileEntity

The tile-entity trying to interact with the block.

item

The item used to interact with the block.

location

The location of the block.