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>
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
ConstructorsConstructorDescriptionPlayerMouseMotionEvent(com.hypixel.hytale.server.core.event.events.player.PlayerMouseMotionEvent originalEvent, Player player) Constructs a new PlayerMouseMotionEvent. -
Method Summary
Modifier and TypeMethodDescriptionlongGets the client use time.com.hypixel.hytale.server.core.asset.type.item.config.ItemGets the item in the player's hand.com.hypixel.hytale.protocol.MouseMotionEventGets the mouse motion event details.Gets the player who moved the mouse.com.hypixel.hytale.protocol.Vector2fGets the screen point coordinates.com.hypixel.hytale.math.vector.Vector3iGets the target block position.com.hypixel.hytale.server.core.entity.EntityGets the target entity.booleanChecks if this event has been cancelled.voidsetCancelled(boolean cancelled) Sets the cancelled state of this event.
-
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 eventplayer- 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
-