PlayerInteractEvent
Importing the class
If you need to reference this type directly, like when casting an Array, or as a parameter, you will need to import it. Simply add the import at the top of the file.
Description
This event is the superclass of all other PlayerInteract events. Generally, you want to use the subtypes of this event.Extends
PlayerInteractEvent extends PlayerEvent
.
Members
Getter
If the interaction was on an entity, will be a BlockPos centered on the entity. If the interaction was on a block, will be the position of that block. Otherwise, will be a BlockPos centered on the player.
Return Type:
BlockPos
Getter
The face involved in this interaction. For all non-block interactions, this will return null
Return Type:
Direction
Getter
Return Type:
InteractionHand
Getter
The stack involved in this interaction. May be empty, but will never be null.
Return Type:
IItemStack