Class PlayerMouseMotionEvent

java.lang.Object
fr.hytale.loader.event.types.player.PlayerMouseMotionEvent
All Implemented Interfaces:
com.hypixel.hytale.event.IBaseEvent<Void>, com.hypixel.hytale.event.IEvent<Void>

public class PlayerMouseMotionEvent extends Object implements com.hypixel.hytale.event.IEvent<Void>
Called when a player moves their mouse.

This event is fired when a player moves their mouse cursor. It provides access to the mouse motion details and interaction context.

Since:
1.0.2
Version:
1.0.4
Author:
HytaleLoader
  • Constructor Summary

    Constructors
    Constructor
    Description
    PlayerMouseMotionEvent(com.hypixel.hytale.server.core.event.events.player.PlayerMouseMotionEvent originalEvent, Player player)
    Constructs a new PlayerMouseMotionEvent.
  • Method Summary

    Modifier and Type
    Method
    Description
    long
    Gets the client use time.
    com.hypixel.hytale.server.core.asset.type.item.config.Item
    Gets the item in the player's hand.
    com.hypixel.hytale.protocol.MouseMotionEvent
    Gets the mouse motion event details.
    Gets the player who moved the mouse.
    com.hypixel.hytale.protocol.Vector2f
    Gets the screen point coordinates.
    com.hypixel.hytale.math.vector.Vector3i
    Gets the target block position.
    com.hypixel.hytale.server.core.entity.Entity
    Gets the target entity.
    boolean
    Checks if this event has been cancelled.
    void
    setCancelled(boolean cancelled)
    Sets the cancelled state of this event.

    Methods inherited from class Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • PlayerMouseMotionEvent

      public PlayerMouseMotionEvent(com.hypixel.hytale.server.core.event.events.player.PlayerMouseMotionEvent originalEvent, Player player)
      Constructs a new PlayerMouseMotionEvent.
      Parameters:
      originalEvent - the original Hytale player mouse motion event
      player - the player who moved the mouse
  • Method Details

    • getMouseMotion

      public com.hypixel.hytale.protocol.MouseMotionEvent getMouseMotion()
      Gets the mouse motion event details.
      Returns:
      the mouse motion event
    • getClientUseTime

      public long getClientUseTime()
      Gets the client use time.
      Returns:
      the client use time
    • getItemInHand

      public com.hypixel.hytale.server.core.asset.type.item.config.Item getItemInHand()
      Gets the item in the player's hand.
      Returns:
      the item in hand
    • getTargetBlock

      public com.hypixel.hytale.math.vector.Vector3i getTargetBlock()
      Gets the target block position.
      Returns:
      the target block position
    • getTargetEntity

      public com.hypixel.hytale.server.core.entity.Entity getTargetEntity()
      Gets the target entity.
      Returns:
      the target entity
    • getScreenPoint

      public com.hypixel.hytale.protocol.Vector2f getScreenPoint()
      Gets the screen point coordinates.
      Returns:
      the screen point
    • isCancelled

      public boolean isCancelled()
      Checks if this event has been cancelled.
      Returns:
      true if cancelled, false otherwise
    • setCancelled

      public void setCancelled(boolean cancelled)
      Sets the cancelled state of this event.
      Parameters:
      cancelled - true to cancel, false to allow
    • getPlayer

      public Player getPlayer()
      Gets the player who moved the mouse.
      Returns:
      the player