PlayerMoveEvent

Called when a player moves.

This event is called incredibly frequently, and so any processing should be either incredibly fast or handled asynchronously. Even for a server with one or two players, this event could be called up to one hundred times per second, or even more.

Types

Link copied to clipboard
data class Result(val newPosition: Position) : Record

The result of a move event.

Functions

Link copied to clipboard
abstract fun allow()

Allows this event to occur.

Link copied to clipboard

Allows this event to occur, and sets the result to the given result.

Link copied to clipboard
abstract fun deny()

Denies an event from occurring.

Link copied to clipboard

Denies this event from occur, and sets the result to the given result.

Link copied to clipboard
abstract fun isAllowed(): Boolean

Checks if this event is allowed to happen.

Properties

Link copied to clipboard
abstract val newPosition: Position

The position of the player after they moved.

Link copied to clipboard
abstract val oldPosition: Position

The position of the player before they moved.

Link copied to clipboard
abstract val player: Player

The player involved in this event.

Link copied to clipboard

The result that is returned by this event.