Skip to content

PlayerVirtualWorldChangedPayload

What playerVirtualWorldChanged gets: the payload a handler receives.

type PlayerVirtualWorldChangedPayload = {
player: PlayerSnapshot; fromVirtualWorld: number; toVirtualWorld: number; reason: "script" | "reconnect";
};
Field Type Description
player PlayerSnapshot The player, already in the new virtual world.
fromVirtualWorld number The virtual world they left.
toVirtualWorld number The virtual world they are in.
reason "script" | "reconnect" "script": a gamemode moved them. "reconnect": they came back within two minutes and went back to their virtual world.