Player
Defined in: server/api.d.ts:760
A connected ArcaneMP player handle.
Extends
Section titled “Extends”Constructors
Section titled “Constructors”Constructor
Section titled “Constructor”new Player(
id):Player
Defined in: server/api.d.ts:765
Wraps a connected player entity id.
Parameters
Section titled “Parameters”number
Network id of the connected player to wrap.
Returns
Section titled “Returns”Player
Inherited from
Section titled “Inherited from”Methods
Section titled “Methods”beastSeat()
Section titled “beastSeat()”beastSeat(): {
beast:Beast;seat:"rider"|"passenger"; } |null
Defined in: server/api.d.ts:1344
The beast this player rides (beast.mount, once seated) or sits on behind its rider (beast.setPassenger), or null.
Returns
Section titled “Returns”{ beast: Beast; seat: "rider" | "passenger"; } | null
cancelAbility()
Section titled “cancelAbility()”cancelAbility(
channel?):void
Defined in: server/api.d.ts:1180
Ends whatever ability holds that channel on this player, on every client.
Parameters
Section titled “Parameters”channel?
Section titled “channel?”string
The Able channel to clear; “PartialBody” by default.
Returns
Section titled “Returns”void
clearProp()
Section titled “clearProp()”clearProp(
key?):void
Defined in: server/api.d.ts:1153
Takes the prop held under that key off this player’s body, on every client; props under other keys stay. Throws a TypeError for a key that is not a string, and a RangeError for one over 32 characters.
Parameters
Section titled “Parameters”string
The key the prop was equipped under; omitted, the keyless prop.
Returns
Section titled “Returns”void
emit()
Section titled “emit()”emit(
eventName,payloadJson?):void
Defined in: server/api.d.ts:7410
Emits a named script event to this player’s client connection. Throws when the name is over 1 KiB or the payload over 1 MiB.
Parameters
Section titled “Parameters”eventName
Section titled “eventName”string
Client event name.
payloadJson?
Section titled “payloadJson?”string
Optional JSON payload forwarded verbatim to the owning client, at most 1 MiB.
Returns
Section titled “Returns”void
Inherited from
Section titled “Inherited from”endKneel()
Section titled “endKneel()”endKneel():
boolean
Defined in: server/api.d.ts:1054
Stands this kneeling player up now, at the health the kneel’s own timer gives back: full, with the game’s own tuning. A kneel held by Pvp rules kneelSeconds 0 waits for this. playerDownedEnded follows once they are up; set a lower health there.
Returns
Section titled “Returns”boolean
False when the player is not kneeling.
equipProp()
Section titled “equipProp()”equipProp(
path,options?):void
Defined in: server/api.d.ts:1147
Attaches a mesh to a socket of this player’s body, replacing the prop held under the same key, the way LocalPlayer.equipProp does on their own client; every other player sees it, players who arrive later included. Props under different keys are held together, 6 at most with the keyless one, and two keys may share a socket. Their client refuses it without a body, or a seventh key, and getProp and getProps follow once it has applied it. The default socket is the wand’s, so take the wand away or name another. Throws a RangeError for a path that is not an asset path or a key over 32 characters, a TypeError for a key that is not a string, and an Error for malformed materials.
Parameters
Section titled “Parameters”string
A StaticMesh or SkeletalMesh asset path.
options?
Section titled “options?”key defaults to “”, the keyless prop; socket to “WandSocket”; offset is relative to the socket.
Returns
Section titled “Returns”void
fastTravel()
Section titled “fastTravel()”fastTravel(
name):number
Defined in: server/api.d.ts:892
Queues a named fast-travel hop on this player’s client. For a map without a fast-travel point, travelToMap.
Parameters
Section titled “Parameters”string
A known fast-travel destination name (case-insensitive).
Returns
Section titled “Returns”number
Request id reported by playerFastTravelCompleted, or 0 when the name is unknown.
fastTravelAsync()
Section titled “fastTravelAsync()”fastTravelAsync(
name):Promise<{requestId:number;status:number; }>
Defined in: server/api.d.ts:1098
fastTravel, awaited: resolves with the request id and status playerFastTravelCompleted also carries. Rejects for an unknown name, and when the player disconnects first.
Parameters
Section titled “Parameters”string
A known fast-travel destination name (case-insensitive).
Returns
Section titled “Returns”Promise<{ requestId: number; status: number; }>
The completion.
finishActivity()
Section titled “finishActivity()”finishActivity():
void
Defined in: server/api.d.ts:978
Ends this player’s activity the way LocalPlayer.finishActivity does on their own client: its companion goes off its own way and the outro plays.
Returns
Section titled “Returns”void
follow()
Section titled “follow()”follow(
target,options):boolean
Defined in: server/api.d.ts:1450
Walks this player after another, keeping distanceCm behind them, until stopped, replaced, expired or the target is lost. Ends with playerMoveEnded.
Parameters
Section titled “Parameters”target
Section titled “target”number | Player
Another player, or their id.
options
Section titled “options”Owner tag plus gait or speed, distanceCm, ttlMs, path and lockInput.
Returns
Section titled “Returns”boolean
False when either player has no live character. Throws on bad input.
getActivity()
Section titled “getActivity()”getActivity(): {
id:ActivityId;variant:""|ActivityVariant; } |null
Defined in: server/api.d.ts:1416
This player’s activity and its variant (“” for one without variants) as their client last reported it, or null when none is under way.
Returns
Section titled “Returns”{ id: ActivityId; variant: "" | ActivityVariant; } | null
getAnimalAttack()
Section titled “getAnimalAttack()”getAnimalAttack(): {
attack:string;id:number;phase:AnimalAttackPhase|null; } |null
Defined in: server/api.d.ts:1318
The attack under way, and the last phase its owner reported (null before the first), or null.
Returns
Section titled “Returns”{ attack: string; id: number; phase: AnimalAttackPhase | null; } | null
getAnimalForm()
Section titled “getAnimalForm()”getAnimalForm(): {
color:string;gender:"male"|"female";look:"species"|"cat";scale:number;size:number;species:AnimalFormSpecies; } |null
Defined in: server/api.d.ts:1300
The animal this player wears (see setAnimalForm), its color and gender, and the full scale it wears for it, or null.
Returns
Section titled “Returns”{ color: string; gender: "male" | "female"; look: "species" | "cat"; scale: number; size: number; species: AnimalFormSpecies; } | null
getAutoRespawn()
Section titled “getAutoRespawn()”getAutoRespawn():
boolean
Defined in: server/api.d.ts:1043
Whether this player respawns on their own after dying (see setAutoRespawn).
Returns
Section titled “Returns”boolean
getCosmetics()
Section titled “getCosmetics()”getCosmetics():
Record<string,CosmeticInfo>
Defined in: server/api.d.ts:1394
Every filled cosmetic slot of this player and what setCosmetic put there, in the order the slots were filled, hidden ones included; empty when they wear none or are not connected.
Returns
Section titled “Returns”Record<string, CosmeticInfo>
getFacialEmotion()
Section titled “getFacialEmotion()”getFacialEmotion():
FacialEmotion|null
Defined in: server/api.d.ts:1355
The expression setFacialEmotion holds on this player, or null.
Returns
Section titled “Returns”FacialEmotion | null
getFastTravelEnabled()
Section titled “getFastTravelEnabled()”getFastTravelEnabled():
boolean
Defined in: server/api.d.ts:903
Whether this player may fast travel from their map (see setFastTravelEnabled).
Returns
Section titled “Returns”boolean
getFastTravelUnlocked()
Section titled “getFastTravelUnlocked()”getFastTravelUnlocked():
string[]
Defined in: server/api.d.ts:908
The Floo flames lit on this player’s map, by FastTravelLocations id: the ones their game reported lit, with this server’s setFastTravelUnlocked calls applied at once. Client-reported, like position. Empty until their world first loads; a new connection starts from the game’s own set again.
Returns
Section titled “Returns”string[]
getIP()
Section titled “getIP()”getIP():
string
Defined in: server/api.d.ts:7416
Returns this player’s current remote network address.
Returns
Section titled “Returns”string
Address string, or an empty string when the player or peer is unavailable.
Inherited from
Section titled “Inherited from”getKeepHealthOnTravel()
Section titled “getKeepHealthOnTravel()”getKeepHealthOnTravel():
boolean
Defined in: server/api.d.ts:1065
Whether this player’s health is carried over map loads (see setKeepHealthOnTravel).
Returns
Section titled “Returns”boolean
getLook()
Section titled “getLook()”getLook():
LookJson|null
Defined in: server/api.d.ts:1468
Returns this player’s worn appearance as plain ids under the creator’s category names. Persist it (JSON.stringify) to save a look and hand it back to setLook to restore it. Its gear ids and hood describe the worn items for other players; on the player’s own character those come from the inventory rows (appearanceOverride, hoodUp), so persist the inventory to keep them. Never includes a transmog.
Returns
Section titled “Returns”LookJson | null
The look, or null when there’s no live player appearance.
getMapDiscovery()
Section titled “getMapDiscovery()”getMapDiscovery():
string|null
Defined in: server/api.d.ts:1126
How much of the world map this player has uncovered, as opaque text (about 5 KB) to store per character and pass back to setMapDiscovery: the fog of war their game reported, with this server’s setMapDiscovery calls applied at once. Client-reported. Null until their world first loads; a new connection starts from the game’s own map again. The overland world map only: dungeons keep their own fog.
Returns
Section titled “Returns”string | null
getNametagColor()
Section titled “getNametagColor()”getNametagColor():
number
Defined in: server/api.d.ts:7397
Reads this player’s nametag color.
Returns
Section titled “Returns”number
Packed 0xAARRGGBB color; opaque white when untinted.
Inherited from
Section titled “Inherited from”getNametagText()
Section titled “getNametagText()”getNametagText():
string
Defined in: server/api.d.ts:7391
Reads this player’s nametag text override.
Returns
Section titled “Returns”string
The override, or an empty string when the player’s own name is drawn.
Inherited from
Section titled “Inherited from”getPerch()
Section titled “getPerch()”getPerch():
PerchInfo|null
Defined in: server/api.d.ts:1334
The animal on this player’s shoulder (see setPerch), or null.
Returns
Section titled “Returns”PerchInfo | null
getProp()
Section titled “getProp()”getProp():
HeldProp|null
Defined in: server/api.d.ts:1406
The keyless prop (equipped without a key) as this player’s client last reported it, or null when none is held; getProps lists the keyed ones too.
Returns
Section titled “Returns”HeldProp | null
getProps()
Section titled “getProps()”getProps():
HeldProp[]
Defined in: server/api.d.ts:1411
Every prop this player holds, keyed or not, as their client last reported them, in the order they took their slots.
Returns
Section titled “Returns”HeldProp[]
getPvpFlag()
Section titled “getPvpFlag()”getPvpFlag():
boolean
Defined in: server/api.d.ts:1070
Whether this player has PvP flagged on (see setPvpFlag). A deferred unflag still reads true until it lands.
Returns
Section titled “Returns”boolean
getPvpTeam()
Section titled “getPvpTeam()”getPvpTeam():
string|null
Defined in: server/api.d.ts:1277
This player’s PvP team, or null when they have none.
Returns
Section titled “Returns”string | null
getScale()
Section titled “getScale()”getScale():
number
Defined in: server/api.d.ts:967
Returns this player’s character scale: the human’s own, also while an animal form is worn.
Returns
Section titled “Returns”number
The scale, or 1 when never set.
getScaleMode()
Section titled “getScaleMode()”getScaleMode():
"full"|"visual"
Defined in: server/api.d.ts:973
Returns how this player’s scale is applied (see setScale).
Returns
Section titled “Returns”"full" | "visual"
“full” unless setScale chose “visual”.
getSkinFx()
Section titled “getSkinFx()”getSkinFx():
string|null
Defined in: server/api.d.ts:1371
The skin effect setSkinFx holds on this player, or null.
Returns
Section titled “Returns”string | null
getSpawn()
Section titled “getSpawn()”getSpawn(): {
position: {x:number;y:number;z:number; };yaw:number; } |null
Defined in: server/api.d.ts:1217
This player’s own spawn point (setSpawn), or null when World.spawn applies.
Returns
Section titled “Returns”{ position: { x: number; y: number; z: number; }; yaw: number; } | null
getTransmog()
Section titled “getTransmog()”getTransmog():
string
Defined in: server/api.d.ts:961
Returns the active transmog character id.
Returns
Section titled “Returns”string
The character id, or “” when none.
getWandGlow()
Section titled “getWandGlow()”getWandGlow(): {
b:number;g:number;r:number; } |null
Defined in: server/api.d.ts:1382
The tint setWandGlow holds on this player, as it was stored (8 bits a channel), or null.
Returns
Section titled “Returns”{ b: number; g: number; r: number; } | null
hideUI()
Section titled “hideUI()”hideUI(
name):void
Defined in: server/api.d.ts:941
Destroys this player’s name view (opened via showUI).
Parameters
Section titled “Parameters”string
The view handle opened via showUI.
Returns
Section titled “Returns”void
hold()
Section titled “hold()”hold(
options):boolean
Defined in: server/api.d.ts:1429
Holds this player at a server-owned anchor: their streamed position is clamped before it lands, so every other client sees the anchor.
Parameters
Section titled “Parameters”options
Section titled “options”Owner tag plus either a fixed x/y/z anchor or an anchorId to follow.
Returns
Section titled “Returns”boolean
True when the hold was applied.
holds()
Section titled “holds()”holds():
PlayerHold[]
Defined in: server/api.d.ts:1434
Lists every live hold on this player, for diagnostics and for checking before acting.
Returns
Section titled “Returns”isCollidable()
Section titled “isCollidable()”isCollidable():
boolean
Defined in: server/api.d.ts:1027
Whether this player takes part in player collision (see setCollidable). True unless setCollidable(false).
Returns
Section titled “Returns”boolean
isCrouching()
Section titled “isCrouching()”isCrouching():
boolean
Defined in: server/api.d.ts:994
Whether this player is crouched, as their client last reported: by setCrouching or by one of the game’s crawl spaces.
Returns
Section titled “Returns”boolean
isDead()
Section titled “isDead()”isDead():
boolean
Defined in: server/api.d.ts:1048
Whether this player is dead: true from playerDied until they are back up (playerDownedEnded).
Returns
Section titled “Returns”boolean
isInvulnerable()
Section titled “isInvulnerable()”isInvulnerable():
boolean
Defined in: server/api.d.ts:1038
Whether the server holds this player immune (see setInvulnerable).
Returns
Section titled “Returns”boolean
isNametagHealthVisible()
Section titled “isNametagHealthVisible()”isNametagHealthVisible():
boolean
Defined in: server/api.d.ts:7385
Checks whether the health bar under this player’s nametag is shown.
Returns
Section titled “Returns”boolean
True unless the health bar was hidden; false also when this game has no nametags.
Inherited from
Section titled “Inherited from”BasePlayer.isNametagHealthVisible
isNametagVisible()
Section titled “isNametagVisible()”isNametagVisible():
boolean
Defined in: server/api.d.ts:7379
Checks whether this player’s nametag is shown to other players.
Returns
Section titled “Returns”boolean
True unless the nametag was hidden; false also when this game has no nametags.
Inherited from
Section titled “Inherited from”isRagdoll()
Section titled “isRagdoll()”isRagdoll():
boolean
Defined in: server/api.d.ts:1005
Whether this player lies in ragdoll while alive, as their client last reported: by setRagdoll or knocked down by the game.
Returns
Section titled “Returns”boolean
isVisible()
Section titled “isVisible()”isVisible():
boolean
Defined in: server/api.d.ts:1016
Whether other players can see this player (see setVisible).
Returns
Section titled “Returns”boolean
isVisibleFor()
Section titled “isVisibleFor()”isVisibleFor(
viewer):boolean
Defined in: server/api.d.ts:1289
Whether viewer sees this player: their setVisibleFor override, else setVisible. True for the player themselves.
Parameters
Section titled “Parameters”viewer
Section titled “viewer”Player
Returns
Section titled “Returns”boolean
kick()
Section titled “kick()”kick(
reason?):void
Defined in: server/api.d.ts:7403
Disconnects this player from the server.
Parameters
Section titled “Parameters”reason?
Section titled “reason?”string
Optional reason shown to the disconnected player; omitting it uses the generic kicked reason.
Returns
Section titled “Returns”void
Inherited from
Section titled “Inherited from”launch()
Section titled “launch()”launch(
x,y?,z?,opts?):boolean
Defined in: server/api.d.ts:874
Launches the player: sets their velocity in cm/s (added to the current one unless opts.overrideXY / overrideZ) and puts them in the air, on their client. True when sent. No effect while a cutscene or mount holds their movement; a root-motion animation can override the horizontal part.
Parameters
Section titled “Parameters”number | Vector3
X component, or the whole vector.
number
Y component.
number
Z component.
space (‘world’ | ‘local’), at, velocityChange, addToCurrent, overrideXY, overrideZ.
Returns
Section titled “Returns”boolean
location()
Section titled “location()”location():
PlayerLocation|null
Defined in: server/api.d.ts:1422
Returns the player’s current game-authored area and region together with the latest replicated transform. The coordinate-space identifiers are client-observed and should be trusted like player position.
Returns
Section titled “Returns”PlayerLocation | null
Null until the owning client reaches a playable world, and while it is changing worlds.
moveTo()
Section titled “moveTo()”moveTo(
x,y?,z?,options?):boolean
Defined in: server/api.d.ts:1442
Walks this player to a point with the game’s own walk: their client steers the stick its on-foot controls read, so every client sees a normal walk. Ends with playerMoveEnded. A modified client can ignore it; pair it with hold() where that matters.
Parameters
Section titled “Parameters”number | Vector3Like
number
number
A player’s origin, the same convention as position.
options?
Section titled “options?”Required. Owner tag plus gait or speed, acceptRadius, ttlMs, path and lockInput.
Returns
Section titled “Returns”boolean
False when the player has no live, connected character. Throws on bad input.
moving()
Section titled “moving()”moving():
PlayerMoving|null
Defined in: server/api.d.ts:1462
The drive this player is walking, or null.
Returns
Section titled “Returns”PlayerMoving | null
playAbility()
Section titled “playAbility()”playAbility(
classPath,channel?):void
Defined in: server/api.d.ts:1174
Plays an Able ability on this player through the game’s own PlayAbilityByClass, the way LocalPlayer.playAbility does on their own client; every other player sees it. The partial-body abilities play over walking. An ability with no length of its own holds its channel until cancelAbility. Throws on a path that is not an ability class path.
Parameters
Section titled “Parameters”classPath
Section titled “classPath”string
An Able ability class path ending ‘_C’, e.g. ‘/Game/Pawn/Student/Abilities/PartialBody/Waving/ABL_Waving.ABL_Waving_C’.
channel?
Section titled “channel?”string
The Able channel: “FullBody” (default) or “PartialBody”.
Returns
Section titled “Returns”void
playAnimalAttack()
Section titled “playAnimalAttack()”playAnimalAttack(
attack):number
Defined in: server/api.d.ts:1307
Plays one of the worn enemy’s own attacks on its body, on every client drawing this player and their own: the troll’s club swing, overhead smash, rage slam and rock throw, a wolf’s bites, a spider’s bite and spit, and so on. It is presentation only: the game’s animation, props (the troll’s rock in its hand) and effects play, but nothing is hit and nothing is thrown, so the script decides what lands. The body faces where the player faces and attacks the ground in front of it. A new attack interrupts the one under way, and a new form, death or a disconnect ends it; playerAnimalAttack follows it from started to ended, interrupted or failed. Their client cannot refuse it, but a modified one can lie about how it went.
Parameters
Section titled “Parameters”attack
Section titled “attack”string
One of the worn species’ attacks, as Player.animalForms() lists them (“swing”, “throw” for a troll).
Returns
Section titled “Returns”number
The attack’s id, as playerAnimalAttack reports it. Throws a RangeError when the player wears no form, or one without that attack.
playClip()
Section titled “playClip()”playClip(
clipPath,options?):void
Defined in: server/api.d.ts:1167
Plays an AnimSequence on this player the way LocalPlayer.playClip does on their own client, replacing the clip they play; every other player sees it, players who arrive later included. It holds the whole body and ends when they move. Their client refuses it without a body, and the clip property follows once it plays. Throws on a path that is not an asset path or a rate out of range.
Parameters
Section titled “Parameters”clipPath
Section titled “clipPath”string
An AnimSequence asset path, e.g. ‘/Game/Animation/Human/Hu_Crouch_RF_Idle_anm.Hu_Crouch_RF_Idle_anm’.
options?
Section titled “options?”loop defaults true; hold (a one-shot keeps its last frame) defaults true; rate is 0.01..10, default 1.
boolean
boolean
number
Returns
Section titled “Returns”void
release()
Section titled “release()”release(
owner):boolean
Defined in: server/api.d.ts:922
Drops only this owner’s hold on the player.
Parameters
Section titled “Parameters”string
The owner tag passed to hold().
Returns
Section titled “Returns”boolean
True when that owner actually held them.
respawn()
Section titled “respawn()”respawn(
options?):boolean
Defined in: server/api.d.ts:1199
Respawns this dead player now: their client reloads Overland and stands them at the position. playerDownedEnded follows once they are up.
Parameters
Section titled “Parameters”options?
Section titled “options?”An Overland position and heading in degrees to stand up at; omitted uses their spawn point (getSpawn, else World.spawn), or the game’s default start when neither is set.
position?
Section titled “position?”{ x: number; y: number; z: number; }
position.x
Section titled “position.x”number
position.y
Section titled “position.y”number
position.z
Section titled “position.z”number
number
Returns
Section titled “Returns”boolean
False when the player is not dead.
revive()
Section titled “revive()”revive(
options?):boolean
Defined in: server/api.d.ts:1206
Revives this dead player where they lie, with no reload: the game’s own get-up plays and the world around them stays as it is. playerDownedEnded follows once they are up. With auto-respawn on, call it inside a playerDied handler, before the respawn is ordered, or hold the death with setAutoRespawn(false).
Parameters
Section titled “Parameters”options?
Section titled “options?”health: what they stand up with, clamped to their maximum; omitted or “max” is full health. The game’s own health recovery runs from there unless setHealthRecovery(false).
health?
Section titled “health?”number | "max"
Returns
Section titled “Returns”boolean
False when the player is not dead, or a respawn or revive is already on its way.
sendChat()
Section titled “sendChat()”sendChat(
message):void
Defined in: server/api.d.ts:885
Sends a chat line to this player.
Parameters
Section titled “Parameters”message
Section titled “message”string
Chat line to send to this player.
Returns
Section titled “Returns”void
sendUI()
Section titled “sendUI()”sendUI(
name,event,payloadJson):void
Defined in: server/api.d.ts:949
Sends a message to this player’s name view (fires a DOM CustomEvent).
Parameters
Section titled “Parameters”string
The view handle opened via showUI.
string
DOM CustomEvent name fired on the page.
payloadJson
Section titled “payloadJson”string
JSON text used as the event detail.
Returns
Section titled “Returns”void
setAnimalForm()
Section titled “setAnimalForm()”setAnimalForm(
form):void
Defined in: server/api.d.ts:1295
Turns this player into an animal on every client, their own included: the human is hidden and an inert copy of the animal walks at its feet, taking its walk, trot and gallop from the player’s speed; an enemy creature’s copy is its pawn without its AI, which neither fights nor counts as an enemy; a species that flies in the game takes its flight poses whenever the player is well off the ground. Their own client holds their spells off while it lasts. The player’s capsule, camera and hitbox are fitted to the animal (full scale, held to setScale’s range, which also holds the size); setScale meanwhile sets the human’s size, which comes back with null. Throws a RangeError for a species outside Player.animalForms(), for the cat look on anything but a Kneazle, for a color the form does not have, for a gender other than “male” or “female”, and for a size of 0 or less.
Parameters
Section titled “Parameters”{ color?: string; gender?: "male" | "female"; look?: "species" | "cat"; size?: number; species: AnimalFormSpecies; } | null
The animal to wear: a beast, a wild animal or an enemy creature (Player.animalForms() lists them); look: "cat" dresses a Kneazle in the castle cat’s mesh, and size (default 1) is the animal against its natural size. color is one of the species’ Player.animalForms() colors, or for the cat look “Default” (grey) or “Variation1”-“Variation9” (black, calico, orange, Siamese, Somali, spotted, striped, tortoiseshell, Turkish Van). Omitted, color and gender keep what the player wears now when the species and look stay; otherwise the color is rolled on the game’s spawn weights and the gender is the player’s own. null turns them back.
Returns
Section titled “Returns”void
setAutoRespawn()
Section titled “setAutoRespawn()”setAutoRespawn(
on):void
Defined in: server/api.d.ts:1192
Chooses whether this player respawns on their own a few seconds after dying. While off, a dead player stays down, keeps seeing the world, and does not regenerate until player.respawn. Set it inside a playerDied handler to decide for that death; switching it on while they are held respawns them.
Parameters
Section titled “Parameters”boolean | null
false holds this player where they fell after dying; null restores server.json’s mod.autoRespawn.
Returns
Section titled “Returns”void
setBroomSpeedMultiplier()
Section titled “setBroomSpeedMultiplier()”setBroomSpeedMultiplier(
multiplier):void
Defined in: server/api.d.ts:1247
Scales this player’s broom cruise, boost and turbo speeds on top of their upgrade tier, so tier 3 at 1.5 flies half again as fast as a fully upgraded broom. Their client applies it at once, mounted or not, and holds it over respawns and travel; scripted flight such as races keeps its own speeds. Values above 3 are refused: much faster outruns the world streaming in.
Parameters
Section titled “Parameters”multiplier
Section titled “multiplier”number | null
0.25 to 3; 1 is the tier’s own speed. null restores server.json’s mod.broomSpeedMultiplier.
Returns
Section titled “Returns”void
setBroomUpgradeTier()
Section titled “setBroomUpgradeTier()”setBroomUpgradeTier(
tier):void
Defined in: server/api.d.ts:1241
Gives this player the game’s broom upgrades from Albie Weekes’ shop: each tier raises flying and boost speed and lets the boost meter refill higher above the ground. Their client applies it at once, mounted or not, and holds it over respawns and travel.
Parameters
Section titled “Parameters”number | null
0 (no upgrades) to 3 (all three); null restores server.json’s mod.broomUpgradeTier.
Returns
Section titled “Returns”void
setCollidable()
Section titled “setCollidable()”setCollidable(
collidable):void
Defined in: server/api.d.ts:1022
Takes this player out of player collision (World.setPlayerCollision) or puts them back, on every client, their own included. Server-owned, so their client cannot undo it. NPCs and the world are unaffected.
Parameters
Section titled “Parameters”collidable
Section titled “collidable”boolean
false lets this player pass through everyone, and everyone through them.
Returns
Section titled “Returns”void
setCosmetic()
Section titled “setCosmetic()”setCosmetic(
slot,cosmetic):void
Defined in: server/api.d.ts:1389
Shows a piece of gear or a few meshes on this player on top of what they wear, on every client, their own included, in their AvatarPreview figure and in the character creator; players who arrive later see it too, and it stays through respawns, travel, area changes and changes of look or gear. It is only drawn: their inventory, gear, stats and the game’s menus are untouched. The game fits and animates gear as it does worn gear, in the gear’s own colours (its house colours for gear that has them); any GearID of the game’s gear data works, whatever slot it belongs to, and one the game does not know shows nothing. Each gear piece takes one of the few free places a body has, in the order the slots were filled, so on a crowded body the last ones may not show. A slot named in a worn cosmetic’s hides shows nothing until that cosmetic comes off, and two that hide each other both show nothing. Not drawn on the player while a setTransmog disguise is worn (their AvatarPreview figure, which never shows the disguise, keeps it); hidden with the player by setVisible. At most 8 slots hold something at once. Dropped when they disconnect. Throws a TypeError for a slot that is not a string, for anything but { gear }, { meshes } or null, for a mesh that is not an object with a string path and for hides that is not an array; a RangeError for a slot name that is not 1-32 letters, digits and underscores starting with a letter or is a gear slot’s name, for a GearID that is empty, over 96 characters or holds a quote or control character, for meshes that hold none or more than 4, for a mesh path that is not an asset path or a socket that is empty or over 64 characters, for a hides entry that is no slot name or names this slot, for more than 8 hides, for a ninth slot and for cosmetics too large to send; an Error for malformed materials and when the player is not connected.
Parameters
Section titled “Parameters”string
The cosmetic slot: 1-32 letters, digits and underscores starting with a letter, e.g. “Ears”, matched without regard to case. Any name but a gear slot’s (Head, Face, Neck, Hand, Back, Outfit). A slot needs no definition: it exists while something is in it.
cosmetic
Section titled “cosmetic”CosmeticOptions | null
{ gear } wears the look of that gear item in this slot, by its GearID. { meshes } attaches 1-4 meshes to the body the way equipProp holds a prop, each on its socket, “head” (the body’s head bone) when omitted. hides names other cosmetic slots that show nothing while this one is worn. null empties the slot.
Returns
Section titled “Returns”void
setCrouching()
Section titled “setCrouching()”setCrouching(
on):void
Defined in: server/api.d.ts:989
Crouches this player through the game’s own crouch (the one its crawl spaces use) or releases it; they keep moving, at the crouched walk, and every other player sees it. Held across respawns and map loads until released or they disconnect. Their client refuses to crouch while swimming or mounted and crouches once it can; a crawl space the player is in keeps them down after a release. isCrouching follows once it has applied.
Parameters
Section titled “Parameters”boolean
true crouches the player, false lets them stand.
Returns
Section titled “Returns”void
setDamageGivenMultiplier()
Section titled “setDamageGivenMultiplier()”setDamageGivenMultiplier(
multiplier):void
Defined in: server/api.d.ts:1229
Scales the damage this player deals: to NPCs on their own client, and to other players where the server prices PvP (before Pvp.setPolicy, like damageScale; the killing curse stays lethal). It multiplies with the target’s setDamageTakenMultiplier and stacks on the game’s own gear, potion and difficulty modifiers. Held over respawns and travel.
Parameters
Section titled “Parameters”multiplier
Section titled “multiplier”number | null
1 is native, 0 deals none; null restores 1.
Returns
Section titled “Returns”void
setDamageTakenMultiplier()
Section titled “setDamageTakenMultiplier()”setDamageTakenMultiplier(
multiplier):void
Defined in: server/api.d.ts:1235
Scales the damage this player takes from NPCs and from other players, the same way setDamageGivenMultiplier scales what the attacker deals. Falls, drowning and other damage with no attacker are untouched.
Parameters
Section titled “Parameters”multiplier
Section titled “multiplier”number | null
1 is native, 0 takes none; null restores 1.
Returns
Section titled “Returns”void
setFacialEmotion()
Section titled “setFacialEmotion()”setFacialEmotion(
emotion):void
Defined in: server/api.d.ts:1350
Holds a facial expression on this player on every client, their own included, until it is changed or cleared; players who arrive later see it too. It is the game’s own facial emotion, held above the ones its abilities and scenes ask for, so the body keeps moving and casting under it. Other players see it plainly; on their own screen their own face shows it only faintly, if at all. Dropped when they disconnect. Throws a RangeError for a name outside Player.facialEmotions() and a TypeError for anything but a name or null.
Parameters
Section titled “Parameters”emotion
Section titled “emotion”FacialEmotion | null
One of Player.facialEmotions(), or null to hand the face back to the game.
Returns
Section titled “Returns”void
setFastTravelEnabled()
Section titled “setFastTravelEnabled()”setFastTravelEnabled(
on):void
Defined in: server/api.d.ts:898
Allows or stops this player’s own fast travel from the map, for this connection. Off, their game dims every Floo flame and refuses a pick without asking the server; story travel and player.fastTravel still go. On by default.
Parameters
Section titled “Parameters”boolean
false stops this player fast travelling from their map.
Returns
Section titled “Returns”void
setFastTravelUnlocked()
Section titled “setFastTravelUnlocked()”setFastTravelUnlocked(
ids,unlocked?):number
Defined in: server/api.d.ts:1121
Lights Floo flames on this player’s map, for this connection, the way finding them in their own game does, so they can fast travel there; false dims them. Their game applies it once their world has loaded. Raises no playerFastTravelUnlocked. Throws when the player is not connected.
Parameters
Section titled “Parameters”string | string[]
Floo flames by FastTravelLocations id, such as “FT_HW_Boathouse” (case-insensitive).
unlocked?
Section titled “unlocked?”boolean
false dims them again; default true.
Returns
Section titled “Returns”number
How many Floo flames the ids named; any other id is ignored.
setGearStatMultiplier()
Section titled “setGearStatMultiplier()”setGearStatMultiplier(
multiplier):void
Defined in: server/api.d.ts:1253
Scales what this player’s worn gear adds to their Offense, Defense and Cooldown, the stats the game turns into its gear damage bonus and damage reduction. At 0 they fight as if they wore no gear. Their client re-applies the gear at once and holds it over respawns and travel; item tooltips still show each piece’s own roll.
Parameters
Section titled “Parameters”multiplier
Section titled “multiplier”number | null
0 to 1 of each worn piece’s Offense, Defense and Cooldown; 0 makes gear cosmetic. null restores server.json’s mod.gearStatMultiplier.
Returns
Section titled “Returns”void
setGearTraits()
Section titled “setGearTraits()”setGearTraits(
on):void
Defined in: server/api.d.ts:1259
Allows or strips the traits on this player’s worn gear, such as more Confringo damage or less damage taken from trolls. Their client re-applies the gear at once and holds it over respawns and travel; item tooltips still list the traits.
Parameters
Section titled “Parameters”boolean | null
false strips the traits of this player’s worn gear. null restores server.json’s mod.gearTraits.
Returns
Section titled “Returns”void
setHealth()
Section titled “setHealth()”setHealth(
amount):void
Defined in: server/api.d.ts:1186
Sets this player’s health on their own client, which the game then reports back as usual.
Parameters
Section titled “Parameters”amount
Section titled “amount”number | "max"
New health, or “max” to restore it; the game clamps it to the player’s maximum.
Returns
Section titled “Returns”void
setHealthRecovery()
Section titled “setHealthRecovery()”setHealthRecovery(
on):void
Defined in: server/api.d.ts:1076
Allows or stops this player’s natural health recovery, e.g. for the length of a duel or for good on a roleplay server. Their client holds it over respawns and map loads until it is changed, and a death keeps it off until they are back up either way.
Parameters
Section titled “Parameters”boolean
false stops this player’s health from recovering on its own.
Returns
Section titled “Returns”void
setInvulnerable()
Section titled “setInvulnerable()”setInvulnerable(
on):void
Defined in: server/api.d.ts:1033
Holds or releases this player’s damage immunity. Their client keeps re-applying it while held, even over its own scripts and after a respawn; the server also drops PvP and NPC hits on them. Releasing leaves the flag to client scripts again.
Parameters
Section titled “Parameters”boolean
true to hold this player immune to damage.
Returns
Section titled “Returns”void
setKeepHealthOnTravel()
Section titled “setKeepHealthOnTravel()”setKeepHealthOnTravel(
on):void
Defined in: server/api.d.ts:1060
Keeps this player’s health across map loads such as entering or leaving a dungeon, instead of the full health a fresh body starts with. A respawn after a death still starts full; set its health in playerDownedEnded. Off by default.
Parameters
Section titled “Parameters”boolean
true carries this player’s health over a map load.
Returns
Section titled “Returns”void
setLook()
Section titled “setLook()”setLook(
look,callback?):number
Defined in: server/api.d.ts:1476
Applies a look, sanitizes it and broadcasts it; clears any transmog. A malformed field (a gear id without GA_, an unknown category, a newer version) fails with INVALID_APPEARANCE naming it before anything reaches the client; an id the game does not know is dropped by the game, so read getLook back. Its gear and hood reach other players’ view of this player only: the player’s own worn items keep their inventory state, so restore those with player.inventory.
Parameters
Section titled “Parameters”string | LookJson
A look from getLook, Creator.exportLook or playerAppearanceChanged, or its JSON text.
callback?
Section titled “callback?”Called after the owning client’s native appearance reload settles.
Returns
Section titled “Returns”number
The native acknowledgement request id, or 0 when no callback was supplied.
setMapDiscovery()
Section titled “setMapDiscovery()”setMapDiscovery(
discovery):void
Defined in: server/api.d.ts:1132
Sets how much of the world map this player has uncovered, for this connection. Their game applies it once their world has loaded, and they keep exploring from there. Raises no playerMapDiscoveryChanged. Throws on any other value, and when the player is not connected.
Parameters
Section titled “Parameters”discovery
Section titled “discovery”string | boolean
true lifts all fog, false fogs everything, a getMapDiscovery() value restores it.
Returns
Section titled “Returns”void
setMaxHealth()
Section titled “setMaxHealth()”setMaxHealth(
maxHealth):void
Defined in: server/api.d.ts:1223
Holds this player’s max health at a server-chosen value. Their client re-applies it over level-ups, gear, respawns and travel; current health is clamped to it, setHealth(“max”) fills to it, and Pvp.getVitals and the PvP policy report it.
Parameters
Section titled “Parameters”maxHealth
Section titled “maxHealth”number | null
New max health; 0 or null restores the native, level-driven value.
Returns
Section titled “Returns”void
setNametagColor()
Section titled “setNametagColor()”setNametagColor(
color):void
Defined in: server/api.d.ts:7440
Tints the text on this player’s nametag.
Parameters
Section titled “Parameters”number
Packed 0xAARRGGBB color.
Returns
Section titled “Returns”void
Inherited from
Section titled “Inherited from”setNametagHealthVisible()
Section titled “setNametagHealthVisible()”setNametagHealthVisible(
visible):void
Defined in: server/api.d.ts:7428
Shows or hides the health bar under this player’s nametag, leaving the name itself alone.
Parameters
Section titled “Parameters”visible
Section titled “visible”boolean
True to show the health bar under this player’s name, false to hide it.
Returns
Section titled “Returns”void
Inherited from
Section titled “Inherited from”BasePlayer.setNametagHealthVisible
setNametagText()
Section titled “setNametagText()”setNametagText(
text?):void
Defined in: server/api.d.ts:7434
Overrides the text drawn on this player’s nametag.
Parameters
Section titled “Parameters”string
Text to show instead of the player’s name, cut to 64 bytes; empty or omitted restores the name.
Returns
Section titled “Returns”void
Inherited from
Section titled “Inherited from”setNametagVisible()
Section titled “setNametagVisible()”setNametagVisible(
visible):void
Defined in: server/api.d.ts:7422
Shows or hides the name over this player’s head for every other player. The health bar has its own switch, and each player can still hide all nametags locally.
Parameters
Section titled “Parameters”visible
Section titled “visible”boolean
True to show this player’s nametag to everyone, false to hide it.
Returns
Section titled “Returns”void
Inherited from
Section titled “Inherited from”setPerch()
Section titled “setPerch()”setPerch(
perch):void
Defined in: server/api.d.ts:1329
Puts an animal on this player’s shoulder on every client, their own included: an inert copy of the game’s own creature, attached to the body, that rides along through walking, casting and flight. size is against the animal’s natural size and defaults to one that fits a shoulder, no taller than 30 cm and no longer than 34 (Player.perches() gives each species’ height, reach and default); it is held so the animal stands between 4 and 90 cm and reaches no further than 120. shoulder is “left” (default) or “right”, pose “stand” (default), “sit”, “lie” or “sleep”. offset moves and turns it against the shoulder point, for a body or a size the default spot does not suit: x, y, z in cm on a body of natural size (ahead, away from the neck, up; each held within 100), then pitch, yaw, roll in degrees (nose up, turned and leaned away from the neck) about its feet. It is mirrored by the shoulder, so one offset reads the same on either, and is none when left out. An omitted color is rolled on the game’s own weights, and color and gender carry over a change of size, shoulder or pose. Server-owned and dropped when they disconnect; hidden with the player by setVisible. Throws a RangeError for an unknown species, color, shoulder or pose.
Parameters
Section titled “Parameters”PerchOptions | null
The animal to carry: a beast or a wild animal (Player.perches() lists them), or null to put it down.
Returns
Section titled “Returns”void
setPvpFlag()
Section titled “setPvpFlag()”setPvpFlag(
on):object
Defined in: server/api.d.ts:1266
Flags this player for PvP, or unflags them. An unflag within rules.flagCombatLockSeconds of their last PvP hit waits that out: the answer says how long, and pvpFlagChanged fires when it lands. Every client sees the flag.
Parameters
Section titled “Parameters”boolean
true opts this player into PvP under rules.who “flagged”.
Returns
Section titled “Returns”object
Whether they are flagged now, and pendingMs while an unflag waits.
flagged
Section titled “flagged”flagged:
boolean
pendingMs?
Section titled “pendingMs?”
optionalpendingMs?:number
setPvpTeam()
Section titled “setPvpTeam()”setPvpTeam(
team):void
Defined in: server/api.d.ts:1272
Puts this player on a PvP team. Teammates never hurt each other unless rules.friendlyFire is on, and under rules.who “teams” only players on different teams fight. Every client sees the team.
Parameters
Section titled “Parameters”string | null
Any name of up to 32 bytes; null or “” leaves every team.
Returns
Section titled “Returns”void
setRagdoll()
Section titled “setRagdoll()”setRagdoll(
on):void
Defined in: server/api.d.ts:1000
Drops this player into the game’s ragdoll where they stand and keeps them down, or lets them back up, within a few seconds; they cannot move or cast meanwhile. Other players see the body collapse and lie still, not the physics. Their client refuses it without a body, dead or mounted, and drops the hold when they die, respawn or change map. isRagdoll follows once it has applied.
Parameters
Section titled “Parameters”boolean
true drops the player limp, false lets them get up.
Returns
Section titled “Returns”void
setScale()
Section titled “setScale()”setScale(
scale,mode?):void
Defined in: server/api.d.ts:1401
Resizes this player’s character on every client, their own included. A broom they ride is resized with them in either mode; its flight collision keeps native size. Full mode honours any size: a large capsule will not fit through doors. In an animal form this is the human’s size, worn again once the form ends.
Parameters
Section titled “Parameters”number
Uniform body scale; 1 is native, clamped to 0.1-10.
"full" | "visual"
“full” (default) also resizes collision, the hitbox and the lock-on point; “visual” resizes only the body and worn gear.
Returns
Section titled “Returns”void
setSkinFx()
Section titled “setSkinFx()”setSkinFx(
name):void
Defined in: server/api.d.ts:1366
Holds one of the game’s skin effects (the material effects it draws over a body: stone skin, the potion glows, outlines) on this player on every client, their own included, until it is changed or cleared; players who arrive later see it too. One effect is held at a time, and a body shows one skin effect at a time: the game’s own effects can cover the held one, which comes back when they end. An effect that ends on its own is started again. A name the game’s library does not have holds nothing visible. Dropped when they disconnect. Throws a RangeError for a name that is not 1-48 letters and digits and a TypeError for anything but a name or null.
Parameters
Section titled “Parameters”string | null
A skin effect’s name in the game’s SkinFX library, e.g. “StoneSkin”, or null to end the held one.
Returns
Section titled “Returns”void
setSpawn()
Section titled “setSpawn()”setSpawn(
spawn):void
Defined in: server/api.d.ts:1212
Sets where this player’s world loads stand them, ahead of World.setSpawn. Set inside a playerConnected handler, it places the load that brings them into the world, so they never pass through the dormitory; after that it applies to their respawns without a position. It is held for this connection only. A handler that awaits before calling it misses the connect load: fetch saved positions in playerConnecting instead.
Parameters
Section titled “Parameters”{ position: { x: number; y: number; z: number; }; yaw?: number; } | null
An Overland position and a heading in degrees (default 0); null falls back to World.spawn.
Returns
Section titled “Returns”void
setTransmog()
Section titled “setTransmog()”setTransmog(
characterId):void
Defined in: server/api.d.ts:955
Disguises this player as a registered game character (session-only).
Parameters
Section titled “Parameters”characterId
Section titled “characterId”string
A CharacterDefinition id (e.g. ‘EleazarFig’); “” reverts.
Returns
Section titled “Returns”void
setVirtualWorld()
Section titled “setVirtualWorld()”setVirtualWorld(
world):void
Defined in: server/api.d.ts:928
Moves this player into another virtual world within the map they are in.
Parameters
Section titled “Parameters”number
Virtual-world identifier used to partition replication and visibility.
Returns
Section titled “Returns”void
Inherited from
Section titled “Inherited from”setVisible()
Section titled “setVisible()”setVisible(
visible):void
Defined in: server/api.d.ts:1011
Hides or shows this player on every other client: body, wand, held prop, the broom or creature they ride, nametag, minimap blip and collision. Server-owned, so their own client cannot undo it; their own view is unchanged. Newcomers see it too. setVisibleFor overrides it for one viewer.
Parameters
Section titled “Parameters”visible
Section titled “visible”boolean
false hides this player from everyone else.
Returns
Section titled “Returns”void
setVisibleFor()
Section titled “setVisibleFor()”setVisibleFor(
viewer,visible):void
Defined in: server/api.d.ts:1284
Overrides setVisible for one viewer, so a player can be hidden from some players only, or seen only by some. Hides what setVisible hides, and the two pass through each other while either cannot see the other. Server-owned; an override goes when either player leaves. Throws a RangeError past 1024 viewers on one player.
Parameters
Section titled “Parameters”viewer
Section titled “viewer”Player
The player whose view this changes; not this player.
visible
Section titled “visible”boolean | null
false hides this player from viewer, true shows this player to viewer while setVisible(false) hides them from everyone else, null goes back to setVisible.
Returns
Section titled “Returns”void
setVisibleTo()
Section titled “setVisibleTo()”setVisibleTo(
player):void
Defined in: shared.d.ts:82
Restricts replication to one player’s connection, within the usual range and visibility checks; null lifts it.
Parameters
Section titled “Parameters”player
Section titled “player”Entity | null
Returns
Section titled “Returns”void
Inherited from
Section titled “Inherited from”setWandGlow()
Section titled “setWandGlow()”setWandGlow(
color):void
Defined in: server/api.d.ts:1377
Tints the glow this player’s wand shows when they cast, on every client, their own included, until it is changed or cleared; players who arrive later see it too. The tint is a hue: each spell keeps its own brightness, so { r: 1, g: 0, b: 0 } is that spell’s glow in red and black puts the glow out. Only the wand’s glow changes: a spell’s bolt, trail and impact keep the colors the game drew them in. Dropped when they disconnect. Throws a TypeError for anything but a color or null.
Parameters
Section titled “Parameters”{ b: number; g: number; r: number; } | null
The tint, each channel 0-1, or null for each spell’s own color.
Returns
Section titled “Returns”void
showUI()
Section titled “showUI()”showUI(
name,url):void
Defined in: server/api.d.ts:935
Opens a CEF web view on this player’s client (requires the ui resource).
Parameters
Section titled “Parameters”string
Caller-chosen stable handle for the view.
string
Page the client should open.
Returns
Section titled “Returns”void
startActivity()
Section titled “startActivity()”startActivity(
id,variant?):void
Defined in: server/api.d.ts:1160
Starts an activity on this player the way LocalPlayer.startActivity does on their own client, replacing one under way; every other player sees it. Their client refuses it without a body, dead or mounted, and getActivity follows once it has started; a Howler ends the activity itself once it has had its say, and Pepper-Up once it is drunk. Throws a RangeError for an unknown id or variant.
Parameters
Section titled “Parameters”Which activity.
variant?
Section titled “variant?”One of the activity’s variants; omit for its default, which their client picks: the kite their house’s, the rain cloud snow in winter, the Howler’s voice at random.
Returns
Section titled “Returns”void
stopAnimalAttack()
Section titled “stopAnimalAttack()”stopAnimalAttack():
boolean
Defined in: server/api.d.ts:1313
Ends the attack under way on every client, its body going back to walking; playerAnimalAttack reports it interrupted.
Returns
Section titled “Returns”boolean
False when no attack was under way.
stopClip()
Section titled “stopClip()”stopClip():
void
Defined in: server/api.d.ts:983
Ends whatever clip this player plays, on every client, the way LocalPlayer.stopEmote does on their own.
Returns
Section titled “Returns”void
stopMoving()
Section titled “stopMoving()”stopMoving(
owner?):boolean
Defined in: server/api.d.ts:1457
Ends the drive with “released”; the player stops where they are.
Parameters
Section titled “Parameters”owner?
Section titled “owner?”string
Only this owner’s drive; omit for whichever runs.
Returns
Section titled “Returns”boolean
False when no drive (of that owner) ran.
teleport()
Section titled “teleport()”teleport(
x,y?,z?,options?):number
Defined in: server/api.d.ts:1083
Queues a same-area streamed teleport on this player’s client.
Parameters
Section titled “Parameters”number | Vector3Like
number
number
options?
Section titled “options?”Optional yaw and native downward ground-snap settings.
Returns
Section titled “Returns”number
Request id reported by playerTeleportCompleted.
teleportAsync()
Section titled “teleportAsync()”teleportAsync(
x,y?,z?,options?):Promise<TeleportCompletion>
Defined in: server/api.d.ts:1091
teleport, awaited: resolves with the completion playerTeleportCompleted also carries (check its status), and rejects when the player disconnects first.
Parameters
Section titled “Parameters”number | Vector3Like
X, or the whole destination.
number
number
options?
Section titled “options?”Optional yaw and native downward ground-snap settings.
Returns
Section titled “Returns”Promise<TeleportCompletion>
The completion.
toString()
Section titled “toString()”toString():
string
Defined in: server/api.d.ts:879
Returns a readable representation of this handle.
Returns
Section titled “Returns”string
Inherited from
Section titled “Inherited from”travelToMap()
Section titled “travelToMap()”travelToMap(
map,options?):number
Defined in: server/api.d.ts:1140
Loads another map on this player’s client, a mod’s included, through the game’s own level travel. The client first checks the map and every level are installed (declined otherwise), and loading the map they are in reloads it. Players only meet others in the same map, so this also moves them out of everyone else’s view.
Parameters
Section titled “Parameters”string
The map’s package path: “/Game/Levels/Overland/Overland”, a dungeon such as “/Game/Environment/Azkaban/Maps/Azkaban_Dungeon”, or a mod’s “/
options?
Section titled “options?”Where to stand the player and which extra levels to load; omitted, the map’s own default start (on Overland, their spawn point when one is set) and nothing more.
Returns
Section titled “Returns”number
Request id reported by playerMapTravelCompleted.
travelToMapAsync()
Section titled “travelToMapAsync()”travelToMapAsync(
map,options?):Promise<MapTravelCompletion>
Defined in: server/api.d.ts:1106
travelToMap, awaited: resolves with the completion playerMapTravelCompleted also carries (check its status), and rejects when the player disconnects first.
Parameters
Section titled “Parameters”string
The map’s package path, as travelToMap takes it.
options?
Section titled “options?”As travelToMap takes them.
Returns
Section titled “Returns”Promise<MapTravelCompletion>
The completion.
travelToPlace()
Section titled “travelToPlace()”travelToPlace(
name):number
Defined in: server/api.d.ts:915
Takes this player to a place no single map makes, such as Gringotts from the intro: a travelToMap to the place’s map and spawn with the levels the game loads with it. Players there only see others who went to the same map.
Parameters
Section titled “Parameters”"intro.gringotts" | "intro.vault" | "intro.cliffside"
A place the game builds from several maps (case-insensitive).
Returns
Section titled “Returns”number
Request id reported by playerMapTravelCompleted, or 0 when the name is no place.
travelToPlaceAsync()
Section titled “travelToPlaceAsync()”travelToPlaceAsync(
name):Promise<MapTravelCompletion>
Defined in: server/api.d.ts:1113
travelToPlace, awaited: resolves with the completion playerMapTravelCompleted also carries. Rejects for an unknown place, and when the player disconnects first.
Parameters
Section titled “Parameters”"intro.gringotts" | "intro.vault" | "intro.cliffside"
A place travelToPlace knows.
Returns
Section titled “Returns”Promise<MapTravelCompletion>
The completion.
animalForms()
Section titled “animalForms()”
staticanimalForms():AnimalFormInfo[]
Defined in: server/api.d.ts:1323
Every species setAnimalForm accepts: the beasts of Beast.catalog(), then the game’s wild and farm animals (kind “wildlife”), then its enemy creatures by EnemyDefinition id (kind “enemy”: spiders, trolls, wolves, the Inferius and Dugbogs, each in its single “Default” color), each with its colors and their spawn weights, whether it takes flight poses in the air, and the attacks playAnimalAttack plays on it (none but an enemy’s).
Returns
Section titled “Returns”facialEmotions()
Section titled “facialEmotions()”
staticfacialEmotions():FacialEmotion[]
Defined in: server/api.d.ts:1360
Every expression setFacialEmotion accepts: the game’s facial emotions that play a facial animation.
Returns
Section titled “Returns”perches()
Section titled “perches()”
staticperches():PerchSpeciesInfo[]
Defined in: server/api.d.ts:1339
Every species setPerch accepts: the beasts of Beast.catalog(), then the game’s wild and farm animals, each with its natural height and reach (nose to tail, or wingtip to wingtip) in cm, the size setPerch gives it by default, and its colors.
Returns
Section titled “Returns”Properties
Section titled “Properties”accountId
Section titled “accountId”
readonlyaccountId:string
Defined in: server/api.d.ts:7332
The account this player proved when they connected: 32 hex characters, the same on every server and in every session, that no other client can claim. Key saved data, ownership, bans and permissions on it. It stands for a key the player’s client keeps on their computer, so a player who loses that file starts a new account. Empty once the player has left.
Inherited from
Section titled “Inherited from”appearanceRevision
Section titled “appearanceRevision”
readonlyappearanceRevision:number
Defined in: server/api.d.ts:780
Monotonic revision of this connection’s authoritative appearance publications.
broomSpeedMultiplier
Section titled “broomSpeedMultiplier”
readonlybroomSpeedMultiplier:number
Defined in: server/api.d.ts:825
The broom speed multiplier this player flies with, 0.25-3 (see setBroomSpeedMultiplier).
broomUpgradeTier
Section titled “broomUpgradeTier”
readonlybroomUpgradeTier:number
Defined in: server/api.d.ts:820
The broom upgrade tier this player flies with, 0-3 (see setBroomUpgradeTier).
readonlyclip: {hold:boolean;loop:boolean;path:string;rate:number; } |null
Defined in: server/api.d.ts:845
The clip this player plays, as their client last reported it, or null: one playClip set here or their own client started.
commonRooms
Section titled “commonRooms”commonRooms: (
"Gryffindor"|"Hufflepuff"|"Ravenclaw"|"Slytherin")[]
Defined in: server/api.d.ts:795
Common rooms this player may enter besides their own house’s, e.g. for staff: those entrances open for them as they would for a member of that house. Their house is unchanged. Assign [] to take the access away.
connected
Section titled “connected”
readonlyconnected:boolean
Defined in: server/api.d.ts:770
Whether this handle still resolves to a connected player.
damageGivenMultiplier
Section titled “damageGivenMultiplier”
readonlydamageGivenMultiplier:number
Defined in: server/api.d.ts:810
The multiplier set by setDamageGivenMultiplier; 1 when native.
damageTakenMultiplier
Section titled “damageTakenMultiplier”
readonlydamageTakenMultiplier:number
Defined in: server/api.d.ts:815
The multiplier set by setDamageTakenMultiplier; 1 when native.
discordId
Section titled “discordId”
readonlydiscordId:string
Defined in: server/api.d.ts:7347
Discord identifier, or an empty string when unavailable. Reported by the player’s client and not verified: a modified client can send anyone’s. Show it or log it; never key ownership, bans or permissions on it, which is what accountId is for. Discord ids are public.
Inherited from
Section titled “Inherited from”discordName
Section titled “discordName”
readonlydiscordName:string
Defined in: server/api.d.ts:7352
Discord username, or an empty string when unavailable. Reported by the player’s client and not verified: a modified client can send anyone’s. Show it or log it; never key ownership, bans or permissions on it, which is what accountId is for.
Inherited from
Section titled “Inherited from”dormitories
Section titled “dormitories”dormitories: (
"witch"|"wizard")[]
Defined in: server/api.d.ts:800
Dormitory staircases this player may climb besides their own pronoun’s, e.g. for staff: “witch” keeps the girls’ staircases from turning into a slide under them, on every client. The game never closes the boys’ staircases, so “wizard” changes nothing. Their gender is unchanged. Assign [] to take the access away.
effects
Section titled “effects”
readonlyeffects:PlayerEffects
Defined in: server/api.d.ts:865
Timed potion effects. apply/clear command the owning client (the ability lives there); has/list read the server-owned mask.
epicId
Section titled “epicId”
readonlyepicId:string
Defined in: server/api.d.ts:7342
Epic Games account identifier, or an empty string when unavailable. Reported by the player’s client and not verified: a modified client can send anyone’s. Show it or log it; never key ownership, bans or permissions on it, which is what accountId is for.
Inherited from
Section titled “Inherited from”
readonlygear:PlayerGear
Defined in: server/api.d.ts:855
Per-slot gear controller: what the player wears on each body slot and what they can wear there. Reads come from the client’s last report and are synchronous; equip, unequip and apply are client round trips whose callback fires once the worn set agrees, carrying the appliedRevision it settled at. Prefer apply for a multi-slot change: it costs one round trip and one client tick instead of one per slot. Slots and item-to-slot mapping come from the game’s own tables, so gear added by a UGC mod behaves like shipped gear.
gearStatMultiplier
Section titled “gearStatMultiplier”
readonlygearStatMultiplier:number
Defined in: server/api.d.ts:830
How much of their worn gear’s stats this player gets, 0-1 (see setGearStatMultiplier).
gearTraits
Section titled “gearTraits”
readonlygearTraits:boolean
Defined in: server/api.d.ts:835
Whether this player’s worn gear traits apply (see setGearTraits).
gender
Section titled “gender”gender:
"male"|"female"
Defined in: server/api.d.ts:790
Wizard (“male”) or Witch (“female”): the pronoun the game’s dormitory staircases check. Follows the worn look’s pronoun; assignment sets it on the owning client without rebuilding the appearance, and the next published look carries it.
hardwareId
Section titled “hardwareId”
readonlyhardwareId:string
Defined in: server/api.d.ts:7357
Framework hardware identifier, or an empty string when unavailable. Reported by the player’s client and not verified: a modified client can send anyone’s. Show it or log it; never key ownership, bans or permissions on it, which is what accountId is for.
Inherited from
Section titled “Inherited from”house:
"Gryffindor"|"Hufflepuff"|"Ravenclaw"|"Slytherin"|"Unaffiliated"
Defined in: server/api.d.ts:785
Server-owned Hogwarts house; assignment applies it on the owning client.
readonlyid:number
Defined in: shared.d.ts:65
Network id, stable for the entity’s lifetime.
Inherited from
Section titled “Inherited from”inventory
Section titled “inventory”
readonlyinventory:PlayerInventory
Defined in: server/api.d.ts:850
Server-authoritative inventory controller. Its reads never consult client memory, and the model belongs to the connection: a joining player starts empty and everything here is dropped on disconnect.
readonlyip:string
Defined in: server/api.d.ts:7367
Current remote network address, or an empty string when unavailable.
Inherited from
Section titled “Inherited from”maxHealth
Section titled “maxHealth”
readonlymaxHealth:number
Defined in: server/api.d.ts:805
The max health set by setMaxHealth, else the max their client last reported; 0 before the first report.
nickname
Section titled “nickname”
readonlynickname:string
Defined in: server/api.d.ts:840
The player’s current nickname.
readonlyping:number
Defined in: server/api.d.ts:7362
Current round-trip latency in milliseconds, or -1 when unavailable.
Inherited from
Section titled “Inherited from”position
Section titled “position”position:
Vector3
Defined in: shared.d.ts:67
World position. Read, call set(...), then assign back.
Inherited from
Section titled “Inherited from”rotation
Section titled “rotation”rotation:
Vector3|Quaternion
Defined in: shared.d.ts:69
Reads as a quaternion; assignments also accept Euler angles in degrees.
Inherited from
Section titled “Inherited from”
readonlystate:StateBag
Defined in: shared.d.ts:71
This entity’s key/value state: the server writes it, and every client that can see the entity receives it. See StateBag.
Inherited from
Section titled “Inherited from”steamId
Section titled “steamId”
readonlysteamId:string
Defined in: server/api.d.ts:7337
Steam identifier, or an empty string when unavailable. Reported by the player’s client and not verified: a modified client can send anyone’s. Show it or log it; never key ownership, bans or permissions on it, which is what accountId is for.
Inherited from
Section titled “Inherited from”virtualWorld
Section titled “virtualWorld”
readonlyvirtualWorld:number
Defined in: server/api.d.ts:775
The virtual world scripts put this player in. Replication combines it with the game map the player is in, so players in different maps never meet.
Inherited from
Section titled “Inherited from”
readonlywand:PlayerWand
Defined in: server/api.d.ts:860
The player’s wand: whether it is drawn, which wand it is, and the styles the game offers. Reads come from the client’s last report and are synchronous; equip, unequip and setStyle are client round trips with a callback. The game’s own behaviour tree also draws and stows the wand, so equip/unequip are requests, not latches - a callback can come back WAND_REVERTED.