canInteractWithEntity

abstract fun canInteractWithEntity(player: OfflinePlayer, entity: Entity, item: ItemStack): Boolean

Checks if the OfflinePlayer can interact with the Entity using the ItemStack.

Return

If the player can interact with the entity.

Parameters

player

The player trying to interact with the entity.

entity

The entity the player is trying to interact with.

item

The item the player is holding in their hand.


open fun canInteractWithEntity(tileEntity: TileEntity, entity: Entity, item: ItemStack): Boolean

Checks if the TileEntity can interact with the Entity using the ItemStack.

Return

If the tile-entity can interact with the entity.

Parameters

tileEntity

The tile-entity trying to interact with the entity.

entity

The entity the player is trying to interact with.

item

The item the player is holding in their hand.