EventMap
Defined in: server/api.d.ts:242
Native events dispatched through Events.on. Each property is the exact callback argument tuple for that event.
Properties
Section titled “Properties”arenaCompleted
Section titled “arenaCompleted”
readonlyarenaCompleted: [string,Player[]]
Defined in: server/api.d.ts:511
The last wave was cleared. players stood in the arena at that moment; the game’s own reward for it is the arena’s reward item, which this does not grant.
arenaEnded
Section titled “arenaEnded”
readonlyarenaEnded: [string,"stopped"|"completed"|"abandoned"|"disabled"]
Defined in: server/api.d.ts:516
A running arena ended and despawned its enemies: completed (a few seconds after arenaCompleted), abandoned (nobody in it for 20 s), stopped, or disabled.
arenaStarted
Section titled “arenaStarted”
readonlyarenaStarted: [string]
Defined in: server/api.d.ts:496
An arena started; its first wave follows once nearby clients have loaded it.
arenaWaveCleared
Section titled “arenaWaveCleared”
readonlyarenaWaveCleared: [string,number]
Defined in: server/api.d.ts:506
Every enemy of a wave, reinforcements included, has died.
arenaWaveStarted
Section titled “arenaWaveStarted”
readonlyarenaWaveStarted: [string,number]
Defined in: server/api.d.ts:501
A wave was announced; its enemies spawn a moment later. wave counts from 1.
beastBorn
Section titled “beastBorn”Defined in: server/api.d.ts:676
A vivarium mother’s young was born (or hatched) next to her pen. It joins her room’s roster.
beastBreedRequest
Section titled “beastBreedRequest”Defined in: server/api.d.ts:671
A room’s editor bred a pair at a breeding pen in the game: a female and a male of one species, in the pen’s vivarium, the pen free and the vivarium with room for the young. Synchronous: a handler returning false refuses it. Allowed, the mother carries the young (beast.pregnancy), an egg-layer then sits on the egg, and the young is born next to the pen.
beastByproductCollected
Section titled “beastByproductCollected”
readonlybeastByproductCollected: [Beast,Player,string,number]
Defined in: server/api.d.ts:686
A harvest went through: count of item went into the player’s inventory.
beastByproductRequest
Section titled “beastByproductRequest”Defined in: server/api.d.ts:666
A player harvests a vivarium beast’s byproduct in the game, both its needs met and the byproduct full, standing beside it in its room. Synchronous: a handler returning false refuses it and nothing changes. Allowed, the player’s inventory gets the species’ byproduct and the cycle starts again.
beastCaptured
Section titled “beastCaptured”
readonlybeastCaptured: [Player,CapturedBeast]
Defined in: server/api.d.ts:436
A catch went through: the beast left every player’s world and is in the catcher’s bag. The bag belongs to the connection, so save it from here.
beastCaptureRequest
Section titled “beastCaptureRequest”Defined in: server/api.d.ts:431
A catch finished in the catcher’s game, which holds it until the server answers. A handler that returns false synchronously refuses it, and the beast stays.
beastCaptureStart
Section titled “beastCaptureStart”Defined in: server/api.d.ts:426
A player’s Nab-Sack started drawing a beast in. A handler that returns false synchronously cancels the catch, and the Nab-Sack lets the beast go.
beastCared
Section titled “beastCared”Defined in: server/api.d.ts:421
A player petted or fed a beast. A handler that returns false synchronously refuses it.
beastDismounted
Section titled “beastDismounted”
readonlybeastDismounted: [Beast,Player,"rider"|"passenger","script"|"left"|"died"|"dismounted"|"gone"|"riderLeft"]
Defined in: server/api.d.ts:461
A player is off a beast: dismounted (the rider’s own dismount), script (beast.dismount, or setPassenger(null)), died (the player or the beast), left (they disconnected or changed world), gone (the beast was destroyed), or riderLeft (a passenger whose rider got off). A passenger goes before their rider.
beastLifeChanged
Section titled “beastLifeChanged”Defined in: server/api.d.ts:471
A beast was killed, wounded or revived (beast.kill, beast.revive).
beastMounted
Section titled “beastMounted”
readonlybeastMounted: [Beast,Player,"rider"|"passenger"]
Defined in: server/api.d.ts:456
A player is on a beast: the rider once their game has seated them (beast.mount), or the passenger put behind them (beast.setPassenger).
beastMountFailed
Section titled “beastMountFailed”Defined in: server/api.d.ts:466
A beast.mount that started never seated its rider: their game refused it, their copy of the beast never appeared (“timed out”), or beast.dismount withdrew it (“cancelled”). The beast is free again.
beastMoveEnded
Section titled “beastMoveEnded”
readonlybeastMoveEnded: [Beast,"arrived"|"stopped"|"replaced"|"targetGone"|"unreachable"]
Defined in: server/api.d.ts:451
A beast’s moveAlong path or follow ended: arrived (a “once” path’s last waypoint, after its wait), stopped (stop() or a position set), replaced (a new command), unreachable (the game could not reach a waypoint), or targetGone (the followed entity left).
beastReleased
Section titled “beastReleased”
readonlybeastReleased: [Player,CapturedBeast,object]
Defined in: server/api.d.ts:441
A player released a beast from their bag through the Field Guide; at is where they stood.
beastWaypoint
Section titled “beastWaypoint”
readonlybeastWaypoint: [Beast,number,number]
Defined in: server/api.d.ts:446
A beast on a moveAlong path reached a waypoint (index into the caller’s array), before its wait. lap counts completed laps of a “loop” or “pingpong” path.
campActivated
Section titled “campActivated”
readonlycampActivated: [string]
Defined in: server/api.d.ts:521
A camp’s roster spawned because a player came near.
campCleared
Section titled “campCleared”
readonlycampCleared: [string]
Defined in: server/api.d.ts:526
Every enemy of an active camp has died.
characterMoveEnded
Section titled “characterMoveEnded”
readonlycharacterMoveEnded: [Character,MoveEndReason|"targetGone"]
Defined in: server/api.d.ts:411
A character’s path or follow ended: “arrived” after the last point’s wait of a once path, “stopped” on stop() or a position assignment, “replaced” by a new moveAlong, moveTo or follow, “targetGone” when a followed entity left.
characterWaypoint
Section titled “characterWaypoint”
readonlycharacterWaypoint: [Character,number,number]
Defined in: server/api.d.ts:406
A character’s path reached waypoints[index], before its wait. lap counts the laps a loop or pingpong has completed.
chatCommand
Section titled “chatCommand”
readonlychatCommand: [Player,string,string,string[]]
Defined in: server/api.d.ts:586
A player sent a slash command: message is the whole line with its /, command the word after it and args the words after that.
chatMessage
Section titled “chatMessage”
readonlychatMessage: [Player,string]
Defined in: server/api.d.ts:581
A player sent a chat line that is not a command. While any resource listens for it the server stops relaying chat itself, so a listener sends the line on.
colliderSpellHit
Section titled “colliderSpellHit”
readonlycolliderSpellHit: [Collider,Player,ColliderSpellHit]
Defined in: server/api.d.ts:631
A player’s bolt met a collider that stops it. Reported by the caster’s client and rate-limited, so treat it like any client-sourced signal. Bolts of players it lets through, spells that fire no bolt, NPC casts, and thrown objects (Oppugno) ending on a collider that does not deflect raise nothing.
consoleCommand
Section titled “consoleCommand”consoleCommand: [
string,string[]]
Defined in: server/api.d.ts:731
Dispatched for a line typed into the server console that no built-in command (help, ensure, refresh, …) claimed. args is the rest of the line, split on whitespace. The console is the operator’s, so this is the place for commands no player may run.
doorUnlocked
Section titled “doorUnlocked”
readonlydoorUnlocked: [Player,DoorUnlock]
Defined in: server/api.d.ts:536
A player opened a lock by key or Alohomora and it is now fully unlocked in their game. When door.shared is true the server already holds it unlocked for everyone; Doors.clear or Doors.set takes that back.
doorUnlockRequest
Section titled “doorUnlockRequest”
readonlydoorUnlockRequest: [Player,DoorUnlockRequest]
Defined in: server/api.d.ts:531
A player tried to open a lock the server holds shut, by key or Alohomora. Their game has already refused it; a script decides whether to release it, at once with Doors.set or through their own cast and lockpicking with Doors.allowUnlock. Alohomora only gets this far for a player whose Alohomora reaches the door’s lock level, which Doors.set can hold.
entityStateChange
Section titled “entityStateChange”entityStateChange: [
ServerEntity,string,any,any]
Defined in: server/api.d.ts:726
Dispatched when one key of an entity’s state changes: on the server when a script writes it, on a client when the write arrives. value is undefined when the key was removed and previous is undefined when it held nothing before, so a stored null stays distinguishable from an absent key. The entity is whatever the game’s WrapScriptEntity answers, and the base Entity handle by default.
housePointsChange
Section titled “housePointsChange”
readonlyhousePointsChange: ["Gryffindor"|"Hufflepuff"|"Ravenclaw"|"Slytherin",number,number]
Defined in: server/api.d.ts:546
Deprecated
Section titled “Deprecated”Raised alongside housePointsChanged with the same arguments; listen to that instead.
housePointsChanged
Section titled “housePointsChanged”
readonlyhousePointsChanged: ["Gryffindor"|"Hufflepuff"|"Ravenclaw"|"Slytherin",number,number]
Defined in: server/api.d.ts:541
A house’s points changed.
housePointsRequest
Section titled “housePointsRequest”
readonlyhousePointsRequest: [Player,HousePointsRequest]
Defined in: server/api.d.ts:551
A player’s game asked to award or deduct house points. A handler that returns false synchronously refuses the request.
loadingFinished
Section titled “loadingFinished”
readonlyloadingFinished: [Player]
Defined in: server/api.d.ts:271
A player’s load screen was dismissed, after worldReady.
lootableTaken
Section titled “lootableTaken”Defined in: server/api.d.ts:556
A player took a lootable; items is what it gave them.
lootSpotTaken
Section titled “lootSpotTaken”Defined in: server/api.d.ts:561
A player took from a loot spot; items is what it gave them.
npcDamaged
Section titled “npcDamaged”
readonlynpcDamaged: [number,number|null,number,number|null]
Defined in: server/api.d.ts:476
A server-spawned NPC took damage from a player or from another NPC (sourceNpcId). attackerId is the player credited: the reporter for its own hit, a led NPC’s leader for its hit, null for a wild NPC’s. amount is clamped and rate-capped. Client-reported: validate before rewarding it.
npcDied
Section titled “npcDied”
readonlynpcDied: [number,string,number|null,number[]]
Defined in: server/api.d.ts:481
A server-spawned NPC died. killerId is its killer’s network id, or null when none is known, and damagerIds lists every player that damaged it.
npcMoveEnded
Section titled “npcMoveEnded”
readonlynpcMoveEnded: [NPC,"arrived"|"stopped"|"replaced"|"targetGone"|"unreachable"]
Defined in: server/api.d.ts:491
An NPC’s path or follow ended: “arrived” after the last point’s wait of a once path, “stopped” on stop() or its death, “replaced” by a new moveAlong, moveTo or follow, “unreachable” when the game found no way to a point, “targetGone” when the entity it followed left.
npcWaypoint
Section titled “npcWaypoint”
readonlynpcWaypoint: [NPC,number,number]
Defined in: server/api.d.ts:486
An NPC on a moveAlong path reached waypoints[index], before its wait. lap counts the laps a loop or pingpong has completed.
playerAnimalAttack
Section titled “playerAnimalAttack”
readonlyplayerAnimalAttack: [Player,number,string,AnimalAttackPhase]
Defined in: server/api.d.ts:311
An attack from player.playAnimalAttack moved on. The player’s client reports started, hit (its strike window opened), released (its projectile would have left the body) and ended as its own copy of the body plays it, failed when that copy could not play it, and interrupted when that copy went away mid-attack. The server reports interrupted for a new attack, stopAnimalAttack, a new form, death, a disconnect, or an owner that never reported the end. Each phase is raised once per id, and nothing follows ended, interrupted or failed.
playerAppearanceChanged
Section titled “playerAppearanceChanged”
readonlyplayerAppearanceChanged: [Player,LookJson|null,number]
Defined in: server/api.d.ts:346
The server accepted and sanitized a new appearance for a player; revision increases per connection. look is null only if it could not be serialized.
playerConnect
Section titled “playerConnect”
readonlyplayerConnect: [Player]
Defined in: server/api.d.ts:251
Deprecated
Section titled “Deprecated”Raised alongside playerConnected with the same arguments; listen to that instead.
playerConnected
Section titled “playerConnected”
readonlyplayerConnected: [Player]
Defined in: server/api.d.ts:246
A player connected. It is not raised again for players already online when a resource starts.
playerConnecting
Section titled “playerConnecting”playerConnecting: [
PendingConnection]
Defined in: server/api.d.ts:751
Dispatched when a player asks to join, before the connection exists: they hold no player slot, are not counted as online, and are sent nothing – no resource list, no download, no body. The request waits until every handler has returned and every Promise a handler returned has settled, then it is let in if a player slot is free (otherwise it is refused as full). connection.reject() turns it away instead, and so does a handler that throws or rejects, or handlers that have not settled within the server’s admission timeout (30 seconds by default, restarted by every connection.update()). With no handler at all, every request is let in at once.
playerDied
Section titled “playerDied”
readonlyplayerDied: [Player]
Defined in: server/api.d.ts:276
A player’s game reported entering the dead state. Client-reported: validate before acting on it.
playerDisconnect
Section titled “playerDisconnect”
readonlyplayerDisconnect: [Player]
Defined in: server/api.d.ts:261
Deprecated
Section titled “Deprecated”Raised alongside playerDisconnected with the same arguments; listen to that instead.
playerDisconnected
Section titled “playerDisconnected”
readonlyplayerDisconnected: [Player]
Defined in: server/api.d.ts:256
A player is leaving; their handle and inventory still resolve inside the handler. A dropped connection raises nothing else, so clean up anything keyed on the player here.
playerDowned
Section titled “playerDowned”
readonlyplayerDowned: [Player]
Defined in: server/api.d.ts:281
A player’s game reported the near-death kneeling state. Client-reported.
playerDownedEnd
Section titled “playerDownedEnd”
readonlyplayerDownedEnd: [Player]
Defined in: server/api.d.ts:291
Deprecated
Section titled “Deprecated”Raised alongside playerDownedEnded with the same arguments; listen to that instead.
playerDownedEnded
Section titled “playerDownedEnded”
readonlyplayerDownedEnded: [Player]
Defined in: server/api.d.ts:286
A player recovered from the downed state or respawned. Client-reported.
playerFastTravelComplete
Section titled “playerFastTravelComplete”
readonlyplayerFastTravelComplete: [Player,number,number]
Defined in: server/api.d.ts:361
Deprecated
Section titled “Deprecated”Raised alongside playerFastTravelCompleted with the same arguments; listen to that instead.
playerFastTravelCompleted
Section titled “playerFastTravelCompleted”
readonlyplayerFastTravelCompleted: [Player,number,number]
Defined in: server/api.d.ts:356
A player.fastTravel request finished. status: 0 success, 1 superseded, 2 unavailable, 3 declined, 4 timed out.
playerFastTravelRequest
Section titled “playerFastTravelRequest”
readonlyplayerFastTravelRequest: [Player,PlayerFastTravelRequest]
Defined in: server/api.d.ts:371
A player picked a fast-travel destination on their map, and their game holds the travel until the server answers. A handler that returns false synchronously refuses it, and the player stays on the map. Not raised while player.setFastTravelEnabled(false) holds, nor for player.fastTravel.
playerFastTravelUnlocked
Section titled “playerFastTravelUnlocked”
readonlyplayerFastTravelUnlocked: [Player,PlayerFastTravelUnlock]
Defined in: server/api.d.ts:376
A Floo flame lit on a player’s map by their own game, as finding it does. Not raised for player.setFastTravelUnlocked, nor for the flames already lit when their world loads. Client-reported: save from here, but validate before rewarding it.
playerGearChanged
Section titled “playerGearChanged”
readonlyplayerGearChanged: [Player]
Defined in: server/api.d.ts:321
A player’s gear changed.
playerHoldEnded
Section titled “playerHoldEnded”
readonlyplayerHoldEnded: [Player,string,"released"|"disconnect"|"expired"|"anchorLost"]
Defined in: server/api.d.ts:296
A server-owned hold on a player ended. owner is the name it was added under.
playerHoldStrained
Section titled “playerHoldStrained”
readonlyplayerHoldStrained: [Player,string,number]
Defined in: server/api.d.ts:301
A held player keeps reporting positions beyond the hold’s boundary, distanceCm past it.
playerInventoryChanged
Section titled “playerInventoryChanged”
readonlyplayerInventoryChanged: [Player,InventoryItem[]]
Defined in: server/api.d.ts:326
A player’s game reported its native inventory, whole. Client-reported, and it does not change the authoritative inventory.
playerInventoryConsumed
Section titled “playerInventoryConsumed”
readonlyplayerInventoryConsumed: [Player,InventoryItem|null,number]
Defined in: server/api.d.ts:341
An accepted native use of a consumable updated the authoritative inventory; remaining is how many are left.
playerInventoryNativeDelta
Section titled “playerInventoryNativeDelta”
readonlyplayerInventoryNativeDelta: [Player,NativeInventoryDelta]
Defined in: server/api.d.ts:331
A player’s game reported a native acquisition the authoritative inventory does not hold yet. The first report after connecting sets a baseline and raises nothing. Adopt it with player.inventory.adoptNative() only under an allowlist.
playerInventoryUpdated
Section titled “playerInventoryUpdated”
readonlyplayerInventoryUpdated: [Player,InventoryItem[],number]
Defined in: server/api.d.ts:336
A player’s authoritative inventory changed, by a script or by gear and mounts the player changed in game; items is all of it at revision. Save from here.
playerLocationChanged
Section titled “playerLocationChanged”
readonlyplayerLocationChanged: [Player,PlayerLocation|null,PlayerLocation|null]
Defined in: server/api.d.ts:391
A player’s coordinate-space context became available, became unavailable during world travel, or changed area, region or confirmed destination. player.location() inside the handler equals current.
playerMapDiscoveryChange
Section titled “playerMapDiscoveryChange”
readonlyplayerMapDiscoveryChange: [Player]
Defined in: server/api.d.ts:396
Deprecated
Section titled “Deprecated”Raised alongside playerMapDiscoveryChanged with the same arguments; listen to that instead.
playerMapDiscoveryChanged
Section titled “playerMapDiscoveryChanged”
readonlyplayerMapDiscoveryChanged: [Player]
Defined in: server/api.d.ts:381
A player uncovered more of their world map in their own game, as exploring does; read it with player.getMapDiscovery(). At most every few seconds while they explore. Not raised for player.setMapDiscovery, nor for the map their world loads with. Client-reported.
playerMapTravelComplete
Section titled “playerMapTravelComplete”
readonlyplayerMapTravelComplete: [Player,number,number,MapTravelCompletion]
Defined in: server/api.d.ts:401
Deprecated
Section titled “Deprecated”Raised alongside playerMapTravelCompleted with the same arguments; listen to that instead.
playerMapTravelCompleted
Section titled “playerMapTravelCompleted”
readonlyplayerMapTravelCompleted: [Player,number,number,MapTravelCompletion]
Defined in: server/api.d.ts:386
A player.travelToMap or travelToPlace request finished, once the player is playable in the new map. status: 0 arrived, 1 superseded, 2 unavailable, 3 declined (the map or a level is not installed on this client), 4 timed out, 5 failed (the load settled in another map, completion.areaId), 6 level failed (arrived without one of the extra levels).
playerMoveEnded
Section titled “playerMoveEnded”
readonlyplayerMoveEnded: [Player,string,"released"|"interrupted"|"arrived"|"replaced"|"disconnect"|"expired"|"blocked"|"targetLost"|"travel"|"died"]
Defined in: server/api.d.ts:306
A drive from player.moveTo or player.follow ended. The player’s client reports arrived (checked against the server’s copy of their position), blocked (no headway for 5 s), targetLost, interrupted (mounted, swimming, knocked down or taken by a scene for 3 s), travel and died; the server reports the rest. A follow never arrives.
playerSanctuaryEnter
Section titled “playerSanctuaryEnter”
readonlyplayerSanctuaryEnter: [Player,string]
Defined in: server/api.d.ts:646
Deprecated
Section titled “Deprecated”Raised alongside playerSanctuaryEntered with the same arguments; listen to that instead.
playerSanctuaryEntered
Section titled “playerSanctuaryEntered”
readonlyplayerSanctuaryEntered: [Player,string]
Defined in: server/api.d.ts:641
A player entered a Room of Requirement. On a swap between rooms it follows playerSanctuaryExited.
playerSanctuaryExited
Section titled “playerSanctuaryExited”
readonlyplayerSanctuaryExited: [Player,string]
Defined in: server/api.d.ts:651
A player left a Room of Requirement, including by disconnecting.
playerSanctuaryLeave
Section titled “playerSanctuaryLeave”
readonlyplayerSanctuaryLeave: [Player,string]
Defined in: server/api.d.ts:656
Deprecated
Section titled “Deprecated”Raised alongside playerSanctuaryExited with the same arguments; listen to that instead.
playerSpellCast
Section titled “playerSpellCast”
readonlyplayerSpellCast: [Player,string,SpellCastInfo]
Defined in: server/api.d.ts:711
A player cast a server-defined spell; spell is its id and cast where it was aimed. Reported by the caster’s client and rate-limited, so treat it like any client-sourced signal.
playerTeleportComplete
Section titled “playerTeleportComplete”
readonlyplayerTeleportComplete: [Player,number,number,TeleportCompletion]
Defined in: server/api.d.ts:366
Deprecated
Section titled “Deprecated”Raised alongside playerTeleportCompleted with the same arguments; listen to that instead.
playerTeleportCompleted
Section titled “playerTeleportCompleted”
readonlyplayerTeleportCompleted: [Player,number,number,TeleportCompletion]
Defined in: server/api.d.ts:351
A player.teleport request finished. status: 0 success, 1 superseded, 2 unavailable, 3 world changed, 4 teleport failed, 5 timed out.
playerVoiceStart
Section titled “playerVoiceStart”playerVoiceStart: [
Player]
Defined in: server/api.d.ts:736
Dispatched when a player starts speaking, as isPlayerTalking turns true.
playerVoiceStop
Section titled “playerVoiceStop”playerVoiceStop: [
Player]
Defined in: server/api.d.ts:741
Dispatched shortly after a player’s last voice frame, as isPlayerTalking turns false. A player who disconnects while talking gets no stop, so clear them on disconnect too.
playerVoiceTierChange
Section titled “playerVoiceTierChange”playerVoiceTierChange: [
Player,number]
Defined in: server/api.d.ts:746
Dispatched when a player switches voice tier themselves: 0 whisper, 1 normal, 2 shout. setPlayerTier does not raise it.
playerWandChanged
Section titled “playerWandChanged”
readonlyplayerWandChanged: [Player]
Defined in: server/api.d.ts:316
A player’s wand changed.
pvpDefeat
Section titled “pvpDefeat”Defined in: server/api.d.ts:701
A PvP hit defeated a player, by death or by kneeling as the rules decide.
pvpFlagChanged
Section titled “pvpFlagChanged”
readonlypvpFlagChanged: [Player,boolean]
Defined in: server/api.d.ts:696
A player’s PvP flag turned on or off.
pvpHit
Section titled “pvpHit”
readonlypvpHit: [number,number,string,number,BodyPart|null]
Defined in: server/api.d.ts:706
A PvP hit passed arbitration and policy and was relayed to its victim. The ids are network ids, spell is the spell record path (a mod’s own for a modded spell), and damage is the final amount. bodyPart is where it struck, as the policy saw it. Informational: use Pvp.setPolicy to veto or reprice hits.
pvpRulesChanged
Section titled “pvpRulesChanged”
readonlypvpRulesChanged: [PvpRules]
Defined in: server/api.d.ts:691
The PvP rules changed; rules is the new set.
resourceStart
Section titled “resourceStart”resourceStart: [
string]
Defined in: server/api.d.ts:716
Dispatched after a resource entry point has run and immediately before the resource becomes running.
resourceStop
Section titled “resourceStop”resourceStop: [
string]
Defined in: server/api.d.ts:721
Dispatched while a resource is stopping, before its stop callback, timers, exports and event handlers are cleaned up.
sanctuaryChanged
Section titled “sanctuaryChanged”
readonlysanctuaryChanged: [string,number,Player|null]
Defined in: server/api.d.ts:636
A Room of Requirement’s layout changed, including a vivarium beast’s needs met by care or its byproduct harvested (the revision moves only for edits). editor is the player who changed it, or null when no player did.
trainEnded
Section titled “trainEnded”
readonlytrainEnded: ["end"|"despawned"]
Defined in: server/api.d.ts:576
The train is gone: “end” when a departure left the track, “despawned” on despawn() or a spawn() that replaced it.
trainSpawned
Section titled “trainSpawned”
readonlytrainSpawned: [number]
Defined in: server/api.d.ts:566
World.hogwartsExpress.spawn stood the train at t.
trainStopped
Section titled “trainStopped”
readonlytrainStopped: [number]
Defined in: server/api.d.ts:571
The train braked to a stop at t, at the end of a moveTo or a halt.
vivariumMove
Section titled “vivariumMove”
readonlyvivariumMove: [Player,VivariumMove]
Defined in: server/api.d.ts:681
Deprecated
Section titled “Deprecated”Raised alongside vivariumMoveRequest with the same arguments; listen to that instead.
vivariumMoveRequest
Section titled “vivariumMoveRequest”
readonlyvivariumMoveRequest: [Player,VivariumMove]
Defined in: server/api.d.ts:661
A room’s editor moved a beast on the game’s beast screens: released one from their bag into the vivarium they stand in, took one into their bag, returned one to the wild, or summoned one to them. Synchronous: a handler returning false refuses it, and the beast stays where it was.
wandLinkEnded
Section titled “wandLinkEnded”
readonlywandLinkEnded: [WandLink,Player|null,"ended"|"cancelled"|"playerLeft"|"playerDied"]
Defined in: server/api.d.ts:416
A wand link ended. winner is the player a script ended it in favour of, and null for every other reason.
worldEventCleared
Section titled “worldEventCleared”
readonlyworldEventCleared: [string]
Defined in: server/api.d.ts:596
Every enemy of a running world event has died.
worldEventEnded
Section titled “worldEventEnded”
readonlyworldEventEnded: [string]
Defined in: server/api.d.ts:601
A world event despawned because every player left, and its spot started cooling down.
worldEventStarted
Section titled “worldEventStarted”
readonlyworldEventStarted: [string,string]
Defined in: server/api.d.ts:591
A world event spawned at a spot; kind is its encounter, such as WE_ENEMY_ENCOUNTER_WOLF.
worldReady
Section titled “worldReady”
readonlyworldReady: [Player]
Defined in: server/api.d.ts:266
A player’s world, pawn and replication are ready.
zoneEnter
Section titled “zoneEnter”
readonlyzoneEnter: [Zone,Player|Character|Beast|NPC|WorldObject|null]
Defined in: server/api.d.ts:611
Deprecated
Section titled “Deprecated”Raised alongside zoneEntered with the same arguments; listen to that instead.
zoneEntered
Section titled “zoneEntered”
readonlyzoneEntered: [Zone,Player|Character|Beast|NPC|WorldObject|null]
Defined in: server/api.d.ts:606
An entity entered a zone. entity is null only if it was destroyed before the handler ran.
zoneExit
Section titled “zoneExit”
readonlyzoneExit: [Zone,Player|Character|Beast|NPC|WorldObject|null,"left"|"gone",number]
Defined in: server/api.d.ts:621
Deprecated
Section titled “Deprecated”Raised alongside zoneExited with the same arguments; listen to that instead.
zoneExited
Section titled “zoneExited”
readonlyzoneExited: [Zone,Player|Character|Beast|NPC|WorldObject|null,"left"|"gone",number]
Defined in: server/api.d.ts:616
An entity left a zone, or was destroyed inside it: then reason is “gone” and entity is null. entityId is its network id either way.
zoneHazard
Section titled “zoneHazard”Defined in: server/api.d.ts:626
A player’s exposure to a zone’s hazard changed: true once they are inside and unprotected, false when they leave, become protected or the hazard is taken off. Destroying the zone sends none, as it sends no zoneExited. player is null only for one who disconnected inside; playerId is their network id either way.