Class PlayerMoveEvent

java.lang.Object
com.welcome234.pluginsystem.events.PlayerMoveEvent

public class PlayerMoveEvent extends Object
Called when a player moves
  • Constructor Details

    • PlayerMoveEvent

      public PlayerMoveEvent(String playername, double movedX, double movedY)
  • Method Details

    • getPlayer

      public Player getPlayer()
      Gets the player who has moved
      Returns:
      Player instance
    • getMovedX

      public double getMovedX()
      Gets the X coordinate the player has moved to
      Returns:
      X-coordinate
    • getMovedY

      public double getMovedY()
      Gets the Y coordinate the player has moved to
      Returns:
      Y-coordinate
    • isCancelled

      public boolean isCancelled()
      Gets whether this event is cancelled
      Returns:
      Whether cancelled
    • setCancelled

      public void setCancelled(boolean cancelled)
      Sets the cancellation status of this event

      If a player move event is cancelled, the player will be moved back to the position before this move

      Parameters:
      cancelled - Whether cancelled