canUseItem

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

Checks if the OfflinePlayer can use that ItemStack at that Location.

Return

If the player can use the item.

Parameters

player

The player trying to use the item.

item

The item the player tries to use.

location

The location of the player.


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

Checks if the TileEntity can use that ItemStack at that Location.

Return

If the tile-entity can use the item.

Parameters

tileEntity

The tile-entity trying to use the item.

item

The item the player tries to use.

location

The location of the player.