canHurtEntity

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

Checks if the OfflinePlayer can hurt the Entity with this ItemStack

Return

If the player can hurt the entity.

Parameters

player

The player trying to hurt the entity.

entity

The entity the player is trying to hurt.

item

The item the player is holding in their hand.


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

Checks if the TileEntity can hurt the Entity with this ItemStack

Return

If the tile-entity can hurt the entity.

Parameters

tileEntity

The tile-entity trying to hurt the entity.

entity

The entity the player is trying to hurt.

item

The item the player is holding in their hand.