Package com.destroystokyo.paper.event.player

# Class PlayerJumpEvent

java.lang.Object
org.bukkit.event.Event
org.bukkit.event.player.PlayerEvent
com.destroystokyo.paper.event.player.PlayerJumpEvent

All Implemented Interfaces:
  `Cancellable`

public class PlayerJumpEvent extends PlayerEvent implements Cancellable
Called when the server detects the player is jumping.

Added to avoid the overhead and special case logic that many plugins use when checking for jumps via PlayerMoveEvent, this event is fired whenever the server detects that the player is jumping.

## Nested Class Summary

## Nested classes/interfaces inherited from class org.bukkit.event.Event

`Event.Result`

## Field Summary

### Fields inherited from class org.bukkit.event.player.PlayerEvent

`player`

## Constructor Summary

Constructors
Constructor
Description
`PlayerJumpEvent(@NotNull Player player, @NotNull Location from, @NotNull Location to)`

## Method Summary

Modifier and Type
Method
Description
`@NotNull Location`
`getFrom()`
Gets the location this player jumped from
`static @NotNull HandlerList`
`getHandlerList()`
`@NotNull HandlerList`
`getHandlers()`
`@NotNull Location`
`getTo()`
Gets the location this player jumped to This information is based on what the client sends, it typically has little relation to the arc of the jump at any given point.
`boolean`
`isCancelled()`
Gets the cancellation state of this event.
`void`
`setCancelled(boolean cancel)`
Sets the cancellation state of this event.
`void`
`setFrom(@NotNull Location from)`
Sets the location to mark as where the player jumped from

### Methods inherited from class org.bukkit.event.player.PlayerEvent

`getPlayer`

### Methods inherited from class org.bukkit.event.Event

`callEvent, getEventName, isAsynchronous`

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

## Constructor Details

### PlayerJumpEvent

public PlayerJumpEvent(@NotNull @NotNull Player player, @NotNull @NotNull Location from, @NotNull @NotNull Location to)

## Method Details

### isCancelled

public boolean isCancelled()
Gets the cancellation state of this event. A cancelled event will not be executed in the server, but will still pass to other plugins

If a jump event is cancelled, the player will be moved or teleported back to the Location as defined by getFrom(). This will not fire an event

Specified by:
  `isCancelled` in interface `Cancellable`
Returns:
  true if this event is cancelled

### setCancelled

public void setCancelled(boolean cancel)
Sets the cancellation state of this event. A cancelled event will not be executed in the server, but will still pass to other plugins

If a jump event is cancelled, the player will be moved or teleported back to the Location as defined by getFrom(). This will not fire an event

Specified by:
  `setCancelled` in interface `Cancellable`
Parameters:
  `cancel` - true if you wish to cancel this event

### getFrom

@NotNull public @NotNull Location getFrom()
Gets the location this player jumped from

Returns:
  Location the player jumped from

### setFrom

public void setFrom(@NotNull @NotNull Location from)
Sets the location to mark as where the player jumped from

Parameters:
  `from` - New location to mark as the players previous location

### getTo

@NotNull public @NotNull Location getTo()
Gets the location this player jumped to This information is based on what the client sends, it typically has little relation to the arc of the jump at any given point.

Returns:
  Location the player jumped to

### getHandlers

@NotNull public @NotNull HandlerList getHandlers()

Specified by:
  `getHandlers` in class `Event`

### getHandlerList

@NotNull public static @NotNull HandlerList getHandlerList()