canUseBlock
abstract fun canUseBlock(@NotNull player: @NotNull OfflinePlayer, @Nullable item: @Nullable ItemStack, @NotNull location: @NotNull 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(@NotNull tileEntity: @NotNull TileEntity, @Nullable item: @Nullable ItemStack, @NotNull location: @NotNull 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.