Basalt's own: cancelled, the player is put back; a changed toLocation sends them there.
Interface in @minecraft/server
Extends CancellableEvent
Basalt’s own: cancelled, the player is put back; a changed toLocation sends them there.
import type { PlayerMoveBeforeEvent } from '@minecraft/server';Subscribe to it with world.beforeEvents.playerMove.
Example
Section titled “Example”import { world, type PlayerMoveBeforeEvent } from '@minecraft/server';
world.beforeEvents.playerMove.subscribe((event: PlayerMoveBeforeEvent) => { console.log('playerMove', event.player.name);
// Uncomment to stop it from happening. // event.cancel = true;});import { world } from '@minecraft/server';
world.beforeEvents.playerMove.subscribe((event) => { console.log('playerMove', event.player.name);
// Uncomment to stop it from happening. // event.cancel = true;});Properties
Section titled “Properties”player
Section titled “player”read-only
readonly player: Player;Types
fromLocation
Section titled “fromLocation”read-only
readonly fromLocation: Vector3;Types
toLocation
Section titled “toLocation”toLocation: Vector3;Types
Used by
Section titled “Used by”Inherited
Section titled “Inherited”From CancellableEvent: cancel