Class PlayerMoveEvent

java.lang.Object
net.minestom.server.event.Event
net.minestom.server.event.CancellableEvent
net.minestom.server.event.player.PlayerMoveEvent

public class PlayerMoveEvent
extends CancellableEvent
Called when a player is modifying his position.
  • Constructor Details

  • Method Details

    • getPlayer

      @NotNull public Player getPlayer()
      Gets the player who is moving.
      Returns:
      the player
    • getNewPosition

      @NotNull public Position getNewPosition()
      Gets the target position.
      Returns:
      the new position
    • setNewPosition

      public void setNewPosition​(@NotNull Position newPosition)
      Changes the target position.
      Parameters:
      newPosition - the new target position