Skip to content

PlayerInteractEvent

DEPRECATED — This event is deprecated. Use UseBlockEvent (ECS event) for block interactions and PlayerMouseButtonEvent for mouse input handling instead.

Package: com.hypixel.hytale.server.core.event.events.player Extends: PlayerEvent<String> Implements: IEvent<String>, ICancellable Cancellable: Yes

Previously dispatched when a player interacted with the world. No active instantiation sites exist in the current codebase — this event is retained for backward compatibility but is never fired. It has been replaced by UseBlockEvent (for block interactions) and PlayerMouseButtonEvent (for input handling).

FieldTypeAccessorMutableNullable
playerRefRef<EntityStore>getPlayerRef()NoNo
playerPlayergetPlayer()NoNo
actionTypeInteractionTypegetActionType()NoNo
clientUseTimelonggetClientUseTime()NoNo
itemInHandItemStackgetItemInHand()NoNo
targetBlockVector3igetTargetBlock()NoNo
targetRefRef<EntityStore>getTargetRef()NoNo
targetEntityEntitygetTargetEntity()NoNo
  • playerRef — ECS reference to the player entity. Inherited from PlayerEvent.
  • player — The player who triggered the interaction. Inherited from PlayerEvent.
  • actionType — The type of interaction performed.
  • clientUseTime — Client-side timestamp of the use action.
  • itemInHand — The item stack the player is holding.
  • targetBlock — World-space coordinates of the targeted block, if any.
  • targetRef — ECS reference to the targeted entity, if any.
  • targetEntity — The targeted entity, if any.

No active dispatch sites found in the current codebase. This event is deprecated and no longer fired by the server.

// DEPRECATED -- do not use in new code
getEventRegistry().register(PlayerInteractEvent.class, event -> {
InteractionType action = event.getActionType();
Player player = event.getPlayer();
// This listener will never fire -- no dispatch sites exist
});