canHurtEntity
abstract fun canHurtEntity(@NotNull player: @NotNull OfflinePlayer, @NotNull entity: @NotNull Entity, @Nullable item: @Nullable 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(@NotNull tileEntity: @NotNull TileEntity, @NotNull entity: @NotNull Entity, @Nullable item: @Nullable 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.