Class PlayerMoveEvent

java.lang.Object
me.internalizable.numdrassl.api.event.player.PlayerMoveEvent
All Implemented Interfaces:
Cancellable

public class PlayerMoveEvent extends Object implements Cancellable
Event fired when a player moves. This includes position changes, rotation changes, and velocity changes.
  • Constructor Details

    • PlayerMoveEvent

      public PlayerMoveEvent(@Nonnull Player player, double fromX, double fromY, double fromZ, double toX, double toY, double toZ, float fromYaw, float fromPitch, float toYaw, float toPitch)
  • Method Details

    • getPlayer

      @Nonnull public Player getPlayer()
    • getFromX

      public double getFromX()
    • getFromY

      public double getFromY()
    • getFromZ

      public double getFromZ()
    • getToX

      public double getToX()
    • getToY

      public double getToY()
    • getToZ

      public double getToZ()
    • setToX

      public void setToX(double x)
    • setToY

      public void setToY(double y)
    • setToZ

      public void setToZ(double z)
    • getFromYaw

      public float getFromYaw()
    • getFromPitch

      public float getFromPitch()
    • getToYaw

      public float getToYaw()
    • getToPitch

      public float getToPitch()
    • setToYaw

      public void setToYaw(float yaw)
    • setToPitch

      public void setToPitch(float pitch)
    • hasPositionChanged

      public boolean hasPositionChanged()
      Check if the position changed.
    • hasRotationChanged

      public boolean hasRotationChanged()
      Check if the rotation changed.
    • getDistance

      public double getDistance()
      Get the distance moved.
    • isCancelled

      public boolean isCancelled()
      Description copied from interface: Cancellable
      Check if this event has been cancelled.
      Specified by:
      isCancelled in interface Cancellable
      Returns:
      true if the event is cancelled
    • setCancelled

      public void setCancelled(boolean cancelled)
      Description copied from interface: Cancellable
      Set whether this event is cancelled.
      Specified by:
      setCancelled in interface Cancellable
      Parameters:
      cancelled - true to cancel the event