EntityInteractEvent
This event is fired on both sides whenever the player interacts with an entity.
The event is cancelable.
If the event is canceled, will cause the entity to not be interacted with
The event does not have a result.
Importing the class
Importing the class is recommended for events, simply add this line to the top of your script file.
Supertype
EntityInteractEvent extends PlayerInteractEvent. That means all methods available in PlayerInteractEvent are also available in EntityInteractEvent
Listening to the event
Properties
Name | Type | Has Getter | Has Setter |
---|---|---|---|
Name target | Type Entity | Has Getter true | Has Setter false |