Package net.minestom.server.event.player
Class PlayerEntityInteractEvent
java.lang.Object
net.minestom.server.event.player.PlayerEntityInteractEvent
- All Implemented Interfaces:
Event
,EntityEvent
,EntityInstanceEvent
,InstanceEvent
,PlayerEvent
,PlayerInstanceEvent
-
Constructor Summary
ConstructorDescriptionPlayerEntityInteractEvent
(@NotNull Player player, @NotNull Entity entityTarget, @NotNull PlayerHand hand, @NotNull Point interactPosition) -
Method Summary
Modifier and TypeMethodDescription@NotNull PlayerHand
getHand()
Gets with which hand the player interacted with the entity.@NotNull Point
Gets the position at which the entity was interacted@NotNull Player
Gets the player.@NotNull Entity
Gets theEntity
with whogetPlayer()
is interacting.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface net.minestom.server.event.trait.EntityInstanceEvent
getInstance
Methods inherited from interface net.minestom.server.event.trait.PlayerEvent
getEntity
-
Constructor Details
-
PlayerEntityInteractEvent
public PlayerEntityInteractEvent(@NotNull @NotNull Player player, @NotNull @NotNull Entity entityTarget, @NotNull @NotNull PlayerHand hand, @NotNull @NotNull Point interactPosition)
-
-
Method Details
-
getPlayer
Description copied from interface:PlayerEvent
Gets the player.- Specified by:
getPlayer
in interfacePlayerEvent
- Returns:
- the player
-
getTarget
Gets theEntity
with whogetPlayer()
is interacting.- Returns:
- the
Entity
-
getHand
Gets with which hand the player interacted with the entity.- Returns:
- the hand
-
getInteractPosition
Gets the position at which the entity was interacted- Returns:
- the interaction position
- See Also:
-