Skip to content
FMFallout Multiplayer Scripting APIScripting guides and API
Data shapeServer APIGenerated

EventMap

Defined in: server/api.d.ts:7

Native events dispatched through Events.on. Each property is the exact callback argument tuple for that event.

consoleCommand: [string, string[]]

Defined in: server/api.d.ts:501

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.


containerChange: [Player, number, InventoryItem[]]

Defined in: server/api.d.ts:156

Dispatched when a player’s game reports what a container holds now, after they put something in or took something out. To refuse a transfer, refuse the player’s inventoryChange, which reverts the container with it.


containerClose: [Player, number]

Defined in: server/api.d.ts:151

Dispatched when the player holding a container closes its menu; anyone may open it again.


containerOpen: [Player, number]

Defined in: server/api.d.ts:146

Dispatched when a player opens a container nobody else holds. Return false to keep it shut.


doorChange: [Player, number, boolean]

Defined in: server/api.d.ts:136

Dispatched when a player opens or closes a door. Return false to refuse: their door swings back.


entityStateChange: [Entity, string, any, any]

Defined in: server/api.d.ts:496

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.


inventoryChange: [Player, InventoryDelta[]]

Defined in: server/api.d.ts:171

Dispatched when a player’s game reports a change the server would accept: looting, buying, crafting, using an item. Return false to refuse it: the server keeps its record and sends it back to their game, and any container involved keeps what it held. Changes a script made itself do not raise it.


itemDrop: [Player, Item]

Defined in: server/api.d.ts:161

Dispatched when a player drops an item. Return false to refuse: the item leaves the world and goes back into their inventory.


itemPickUp: [Player, Item | null, number | null]

Defined in: server/api.d.ts:166

Dispatched when a player picks up a loose item, before they get it: a dropped or spawned item, or a placed reference by its form ID as ref. Return false to refuse; the item stays where it is.


lockChange: [Player, number, boolean]

Defined in: server/api.d.ts:141

Dispatched when a player picks, unlocks or locks a lock. Return false to refuse: their lock goes back.


mineLaid: [Mine]

Defined in: server/api.d.ts:391

Dispatched once a player’s mine settles and is armed. Return false to refuse: it leaves the world unexploded.


mineRemove: [Mine]

Defined in: server/api.d.ts:401

Dispatched when a mine goes, whatever took it: its blast, a disarm, its owner leaving or a script. The handle still reads.


mineTrigger: [Mine, Player]

Defined in: server/api.d.ts:396

Dispatched when a player walks onto another player’s mine, before it goes off. Return false to keep it armed; the player’s game asks again every half second while they stand on it.


npcActivate: [Player, Npc]

Defined in: server/api.d.ts:421

Dispatched when a player activates an NPC, the Activate button on its body: what a shopkeeper, a quest giver or any interaction starts from. Raised whether or not setActivationBlocked stops the game’s own greeting and dialogue.


npcArrive: [Npc]

Defined in: server/api.d.ts:441

Dispatched once when an NPC reaches where goTo sent it; it then stands there until stopGoing or the next goTo. Sent after a body, it is raised again each time it catches up after the body walked off.


npcAttack: [Npc, Player, number, "direct" | "blast", string | null, number | null, HitInfo]

Defined in: server/api.d.ts:411

Dispatched when an NPC lands a hit on a player, before the victim takes it. Return false to drop the hit, except on a player whose own game runs the NPC (getSimulator), who took it already: that one is told so scripts learn of it. damage is the game’s own, from the client that runs the NPC. limb is the body part struck, as the game names its types (“Head1”, “LeftArm1”, “Torso”…), null for a blast or none; weapon is the weapon form the hit came from, null for none. hit says whether it was a bash, and its setDamage changes what is dealt, as for playerHit.


npcCommand: [Npc, Player, string, number | Player | Npc | null, Vector3]

Defined in: server/api.d.ts:431

Dispatched when a player gives their companion a command in the game’s command mode: command is one of npc.command’s, target the player, NPC or placed reference (by form ID) it is aimed at, null for a point on the ground or something only that player’s game knows, and position where it is. The game carries it out already; a script answers it, with a bark, a cost, or another command.


npcDeath: [Npc, Player | null]

Defined in: server/api.d.ts:416

Dispatched once when an NPC dies. killer is the last player who hit it, or null. It comes back on its own a while later; npcRespawn follows.


npcHit: [Player, Npc, number, "direct" | "blast" | "vats", number, string | null, number | null, HitInfo]

Defined in: server/api.d.ts:406

Dispatched when a player’s game lands a hit on an NPC, before the NPC takes it. Return false to drop the hit, except on an NPC the attacker’s own game runs (getSimulator), which took it already: that one is told so scripts learn who hit it, and the attacker is still the killer npcDeath names. damage is the attacker’s game’s own; kind is a shot or a blow, an explosion’s blast, or a shot of a VATS attack, whose hit the attacker’s game rolled against the chance it showed: refusing one decides VATS hits on the server. vatsChance is the chance the attacker’s VATS showed, 0 to 1, and 0 for any other kind, as for playerHit. limb is the body part struck, as the game names its types (“Head1”, “LeftArm1”, “Torso”…), null for a blast or none; weapon is the weapon form the hit came from, null for none. hit says whether it was a bash, and its setDamage changes what is dealt, as for playerHit.


npcLeaderChange: [Npc, Player | null]

Defined in: server/api.d.ts:456

Dispatched when an NPC becomes a player’s companion (setLeader), or follows nobody any more (leader null): let go, or its leader left.


npcMouthChange: [Npc, number | null]

Defined in: server/api.d.ts:436

Dispatched when what a dog holds in its mouth changes, as the game that runs it has it: it took an item (carryInMouth, or one it fetched), or dropped it (item null).


npcRespawn: [Npc]

Defined in: server/api.d.ts:446

Dispatched when an NPC is back at its placement, whole: on its own after its death, or from respawn.


npcSimulatorChange: [Npc, Player | null]

Defined in: server/api.d.ts:451

Dispatched when another player’s game takes over running an NPC, or when nobody near does any more (simulator null) and the server walks it.


npcTarget: [Npc, Player | Npc | null]

Defined in: server/api.d.ts:426

Dispatched when the player or NPC an NPC fights changes, as the game that runs it decides: it noticed an enemy, switched to another, or stopped fighting (target null, also on its death). Where aggro, bounties and wanted levels start.


playerActivatePlayer: [Player, Player]

Defined in: server/api.d.ts:56

Dispatched when a player activates another player’s body, the Activate button on them: where a trade, a search, a handover or any player-to-player interaction starts. The two stand within reach in the same space.


playerAddicted: [Player, number | null]

Defined in: server/api.d.ts:301

Dispatched when a player becomes addicted. item is the chem or drink that did it. Reported by the player’s game after the fact: it cannot be refused, and the form IDs are the client’s word.


playerAppearanceChange: [Player]

Defined in: server/api.d.ts:46

Dispatched when a player’s game reports a new look after the one they joined with: the look editor closed, or setLook, randomizeLook or setAppearance changed it. getAppearance reads it.


playerAssault: [Player]

Defined in: server/api.d.ts:311

Dispatched when the game’s crime system records an assault by a player on one of its NPCs. Reported by the player’s game after the fact: it cannot be refused, and the form IDs are the client’s word.


playerAttack: [Player, string]

Defined in: server/api.d.ts:66

Dispatched when a player swings a melee weapon or their fists, before it is shown to the players around them. event is the animation event their game took, meleeattackStart among others.


playerBobblehead: [Player]

Defined in: server/api.d.ts:386

Dispatched when a player collects a bobblehead. Reported by the player’s game after the fact: it cannot be refused, and the form IDs are the client’s word.


playerBookRead: [Player, number | null]

Defined in: server/api.d.ts:276

Dispatched when a player reads a book or magazine, the TESObjectBOOK form ID. Reported by the player’s game after the fact: it cannot be refused, and the form IDs are the client’s word.


playerBountyChange: [Player, number, number, number]

Defined in: server/api.d.ts:211

Dispatched when the bounty a player owes a crime faction changes in their game: a crime of theirs the faction saw, a payment, or setBounty / addBounty. bounty is the crime gold now, violent and not together. Where wanted levels and police chases start.


playerCharacterLoad: [Player]

Defined in: server/api.d.ts:176

Dispatched once a player’s character is established, shortly after they join: adopted from their game. Restore a kept character here with setCharacter. Character methods work from here.


playerChat: [Player, string]

Defined in: server/api.d.ts:106

Dispatched for a chat line, before anyone sees it. Return false to swallow it.


playerCommand: [Player, string, string[]]

Defined in: server/api.d.ts:111

Dispatched for a /command arg... line; command has no slash.


playerConnect: [Player]

Defined in: server/api.d.ts:11

Dispatched once a connecting player’s entity exists. It has no position yet; wait for playerReady to place them.


playerConnecting: [PendingConnection]

Defined in: server/api.d.ts:521

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.


playerContainerLoot: [Player, number | null]

Defined in: server/api.d.ts:271

Dispatched when a player takes something from a container. container is the container reference’s form ID. Reported by the player’s game after the fact: it cannot be refused, and the form IDs are the client’s word.


playerCorpseEat: [Player]

Defined in: server/api.d.ts:361

Dispatched when a player feeds on a corpse, as the Cannibal perk lets them. Reported by the player’s game after the fact: it cannot be refused, and the form IDs are the client’s word.


playerCraft: [Player, number | null, number | null, number | null, number]

Defined in: server/api.d.ts:266

Dispatched when a player makes something at a workbench: cooking, chemistry, or a weapon or armor mod. workbench is the bench’s base furniture, recipe the constructible object used, item what it makes and count how many, as the recipe says. Reported by the player’s game after the fact: it cannot be refused, and the form IDs are the client’s word.


playerCriticalHit: [Player, number | null, boolean]

Defined in: server/api.d.ts:326

Dispatched when a player lands a sneak attack (critical false) or a critical hit (true) on an actor, as their HUD says it. weapon is the weapon’s form ID, null for bare hands. Reported by the player’s game after the fact: it cannot be refused, and the form IDs are the client’s word.


playerDeath: [Player, Player | null]

Defined in: server/api.d.ts:26

Dispatched once when a player dies. killer is the last player who hit them, or null. Nothing brings them back on its own: call player.respawn.


playerDisarm: [Player, number | null]

Defined in: server/api.d.ts:381

Dispatched when a player knocks the weapon out of an actor’s hands. target is the actor disarmed. Reported by the player’s game after the fact: it cannot be refused, and the form IDs are the client’s word.


playerDisconnect: [Player]

Defined in: server/api.d.ts:21

Dispatched while a player is leaving, before their entity is destroyed, so the handle still reads. Anything keyed on the player is cleaned up here.


playerExplosion: [Player, Vector3, number, number | null]

Defined in: server/api.d.ts:71

Dispatched when a player’s game sets off an explosion: a grenade, a mine, a missile, an explosive round, or one an NPC it simulates set off (npc, its network ID). explosion is the BGSExplosion form ID. Return false to refuse it: nobody else sees it and its blast lands on no one.


playerFastTravel: [Player, number]

Defined in: server/api.d.ts:226

Dispatched when a player’s game is about to fast travel: a marker picked on the Pip-Boy map, or the game’s own scripts. destination is the reference they would arrive at, a map marker’s form ID. Their game waits for the answer. Return false to refuse it: they stay where they are. Otherwise they travel.


playerFusionCore: [Player, "consumed" | "inserted" | "ejected", number | null, number]

Defined in: server/api.d.ts:101

Dispatched when a player’s game takes a fusion core into their power armor or launches it out. consumed: the suit’s core ran out and their game loaded the next one they carry. inserted: a core went into the empty suit as it reached them. ejected: they launched the core out of the suit (Nuclear Physicist), core null. condition is the core’s charge in percent. Return false to refuse a core taken in: it goes back to their inventory, the suit keeps the charge it had and takes no other core until setPowerArmorBattery gives it a charge or they get out. A launch cannot be refused.


playerFusionCoreConsume: [Player]

Defined in: server/api.d.ts:336

Dispatched when a fusion core runs out in a player’s game: their power armor’s, or the last shot of one they fired. Reported by the player’s game after the fact: it cannot be refused, and the form IDs are the client’s word.


playerFusionCoreEject: [Player]

Defined in: server/api.d.ts:341

Dispatched when a fusion core is ejected from power armor in a player’s game. Reported by the player’s game after the fact: it cannot be refused, and the form IDs are the client’s word.


playerHit: [Player, Player, number, "direct" | "blast" | "hazard" | "vats", number, string | null, number | null, HitInfo]

Defined in: server/api.d.ts:51

Dispatched when a player’s game lands a hit on another player, before the victim takes it. Return false to drop the hit. damage is the attacker’s game’s own. kind is a shot or a blow, an explosion’s blast, a hazard the attacker left (a radiation or gas cloud), which casts its spell and carries no damage figure, or a shot of a VATS attack, whose hit the attacker’s game rolled against the chance it showed: refusing one decides VATS hits on the server (their chances are the game’s fVATS* settings, setGameSetting). vatsChance is the chance the attacker’s VATS showed for the shot, 0 to 1, and 0 for any other kind; with setVatsRolledByServer every such shot strikes on the attacker’s screen, and the handler rolls it, as Math.random() < vatsChance. limb is the body part struck, as the game names its types (“Head1”, “LeftArm1”, “Torso”…), null for a blast or none; weapon is the weapon form the hit came from, null for none. hit says whether it was a bash, and its setDamage changes what the victim is dealt, as a durability or armor system scales it: hit.setDamage(damage * 0.5).


playerHolotape: [Player, number | null, boolean]

Defined in: server/api.d.ts:351

Dispatched when a player’s holotape starts, pauses, resumes or stops: holotape is the tape’s form ID and playing whether it runs now. A tape that plays a recording; one that opens a terminal or a game is not reported. Reported by the player’s game after the fact: it cannot be refused, and the form IDs are the client’s word.


playerInvest: [Player]

Defined in: server/api.d.ts:366

Dispatched when a player invests caps in one of the game’s vendors. Reported by the player’s game after the fact: it cannot be refused, and the form IDs are the client’s word.


playerJetpack: [Player, boolean]

Defined in: server/api.d.ts:91

Dispatched once when the jetpack of a player’s power armor starts thrusting and once when it stops, as their game reports it.


playerJunkFound: [Player, number]

Defined in: server/api.d.ts:346

Dispatched when junk enters a player’s inventory, picked up or given, with the count their game adds to its junk collected stat. Reported by the player’s game after the fact: it cannot be refused, and the form IDs are the client’s word.


playerLevelChange: [Player, number, number]

Defined in: server/api.d.ts:186

Dispatched when the character’s level moves, by XP or by a script.


playerLocationChange: [Player, number | null, number | null]

Defined in: server/api.d.ts:231

Dispatched when a player’s game moves them into another named location (a BGSLocation form ID), or out into the open (null). previous is null for the first one they report after joining.


playerLocationCleared: [Player]

Defined in: server/api.d.ts:321

Dispatched when the game marks the location a player is in as cleared; Player.getLocation names it. Reported by the player’s game after the fact: it cannot be refused, and the form IDs are the client’s word.


playerLocationDiscover: [Player, number | null]

Defined in: server/api.d.ts:331

Dispatched when a player discovers a location by coming up to it. marker is the map marker reference, the one Player.discoverLocations takes; what a script reveals that way is not reported. Reported by the player’s game after the fact: it cannot be refused, and the form IDs are the client’s word.


playerLockPick: [Player]

Defined in: server/api.d.ts:261

Dispatched when a player picks a lock in the lockpicking minigame. lockChange follows with the reference. Reported by the player’s game after the fact: it cannot be refused, and the form IDs are the client’s word.


playerLockpickStart: [Player, number]

Defined in: server/api.d.ts:241

Dispatched when a player’s game is about to open the lockpicking minigame on a locked door or container (ref, the placed reference’s form ID). Their game waits for the answer. Return false to refuse it: the lock stays shut and no pick is spent. Otherwise their game opens it, still checking their bobby pins and whether the lock can be picked at all. playerLockPick and lockChange follow a pick.


playerMapWaypoint: [Player, Vector3 | null]

Defined in: server/api.d.ts:236

Dispatched when a player drops their own marker on the Pip-Boy map, or removes it (position null). Return false to refuse it: their game puts back what they had.


playerMineDisarm: [Player]

Defined in: server/api.d.ts:286

Dispatched when a player disarms a mine. Reported by the player’s game after the fact: it cannot be refused, and the form IDs are the client’s word.


playerMurder: [Player]

Defined in: server/api.d.ts:316

Dispatched when the game’s crime system records a murder by a player. Reported by the player’s game after the fact: it cannot be refused, and the form IDs are the client’s word.


playerMysteriousStranger: [Player]

Defined in: server/api.d.ts:376

Dispatched when the Mysterious Stranger turns up for a player in VATS. Reported by the player’s game after the fact: it cannot be refused, and the form IDs are the client’s word.


playerPerkChange: [Player, number, boolean]

Defined in: server/api.d.ts:196

Dispatched when a perk rank was added to or taken from the character, by their game or by a script.


playerPerkRequest: [Player, number, "buy" | "grant" | "remove"]

Defined in: server/api.d.ts:191

Dispatched when the player’s game changes a perk rank: bought on the perk chart (after the server checked points, level, the rank below and SPECIAL), given by something in the game such as a magazine, or taken away. Return false to refuse it: their game undoes it.


playerPickpocket: [Player, number | null, boolean]

Defined in: server/api.d.ts:281

Dispatched when a player takes an item by pickpocketing. victim is the actor robbed. Reported by the player’s game after the fact: it cannot be refused, and the form IDs are the client’s word.


playerPowerArmor: [Player, boolean]

Defined in: server/api.d.ts:76

Dispatched once when a player gets into a power armor frame (entered) and once when they get out, however it happened.


playerPowerArmorBattery: [Player, number, number]

Defined in: server/api.d.ts:96

Dispatched when the charge of the fusion core in a player’s power armor changes, in whole units: their game drains it (a jump, among others), a new core is loaded, or setPowerArmorBattery set it. Not on getting in.


playerProjectile: [Player, number, Npc | null]

Defined in: server/api.d.ts:36

Dispatched when a player’s game launches a projectile: a missile, a grenade in flight, a flame, or one an NPC it simulates launched (npc). projectile is the BGSProjectile form ID. Return false to refuse: nobody else sees it. It still flies on the shooter’s own screen.


playerReady: [Player]

Defined in: server/api.d.ts:16

Dispatched once the player’s world is synced and they stand in it: the moment to spawn, dress and equip them. Their inventory record follows shortly after, with their first report.


playerReload: [Player, string]

Defined in: server/api.d.ts:61

Dispatched when a player starts a reload, before it is shown to the players around them. event is the animation event their game played.


playerRicochet: [Player]

Defined in: server/api.d.ts:371

Dispatched when a shot at a player bounces back and kills the shooter, the Ricochet perk’s doing. Reported by the player’s game after the fact: it cannot be refused, and the form IDs are the client’s word.


playerSandmanKill: [Player]

Defined in: server/api.d.ts:356

Dispatched when a player kills a sleeping actor with the Mister Sandman kill. Reported by the player’s game after the fact: it cannot be refused, and the form IDs are the client’s word.


playerShoot: [Player]

Defined in: server/api.d.ts:31

Dispatched when a player fires, before the shot is shown to the players around them.


playerSleepWait: [Player, number, boolean]

Defined in: server/api.d.ts:251

Dispatched when a player’s game is about to open the sleep and wait menu: sleep true for a bed they activated, false for waiting in a seat they sit in (ref, the placed reference’s form ID; 0 for one placed at runtime). Their game waits for the answer. Return false to refuse it: no menu opens and no hours pass. Otherwise it opens as the game would, still refused by the game itself with enemies near, in the air, taking damage and so on. The hours a player then sleeps or waits pass on their own game only and their health heals; the server’s clock is the World’s, and their game’s clock goes back to it once the menu closes.


playerSpaceChange: [Player, PlayerSpace, PlayerSpace | null]

Defined in: server/api.d.ts:41

Dispatched when a player’s game reports them in another worldspace or interior: through a door, a fast travel or teleport. previous is null for the first space they report after joining.


playerSpeechChallenge: [Player]

Defined in: server/api.d.ts:291

Dispatched when a player passes a speech challenge in a dialogue. Reported by the player’s game after the fact: it cannot be refused, and the form IDs are the client’s word.


playerSteal: [Player, number]

Defined in: server/api.d.ts:296

Dispatched when a player’s game counts a theft: items taken that belong to someone else. count is how many. Reported by the player’s game after the fact: it cannot be refused, and the form IDs are the client’s word.


playerSwim: [Player, boolean]

Defined in: server/api.d.ts:81

Dispatched once when a player starts swimming and once when they are back on their feet, as their game reports it.


playerTerminalHack: [Player, number | null]

Defined in: server/api.d.ts:256

Dispatched when a player hacks a terminal: the password was found. terminal is the terminal reference’s form ID. Reported by the player’s game after the fact: it cannot be refused, and the form IDs are the client’s word.


playerTerminalOpen: [Player, number]

Defined in: server/api.d.ts:246

Dispatched when a player sits at a terminal (ref, the placed reference’s form ID) and their game is about to open it. Their game waits for the answer, the player seated. Return false to refuse it: they get up without it opening. Otherwise it opens, its hacking minigame first while it is locked. The client’s References.getTerminal reads what it holds.


playerTrespass: [Player]

Defined in: server/api.d.ts:306

Dispatched when a player is caught trespassing by the game’s own crime system. Reported by the player’s game after the fact: it cannot be refused, and the form IDs are the client’s word.


playerUnderwater: [Player, boolean]

Defined in: server/api.d.ts:86

Dispatched once when the water reaches above a player’s neck (player.isUnderwater) and once when it no longer does, as their game reports it.


playerValueChange: [Player, string, number, number]

Defined in: server/api.d.ts:206

Dispatched when an actor value base on the character’s record moved, by their game or by a script.


playerValueRequest: [Player, string, number, number]

Defined in: server/api.d.ts:201

Dispatched when the player’s game moves a SPECIAL base: the SPECIAL menu, a bobblehead, a book. value is its editor ID. Return false to refuse it: their game puts it back.


playerVoiceStart: [Player]

Defined in: server/api.d.ts:506

Dispatched when a player starts speaking, as isPlayerTalking turns true.


playerVoiceStop: [Player]

Defined in: server/api.d.ts:511

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: [Player, number]

Defined in: server/api.d.ts:516

Dispatched when a player switches voice tier themselves: 0 whisper, 1 normal, 2 shout. setPlayerTier does not raise it.


playerWeatherRegionChange: [Player, number, number]

Defined in: server/api.d.ts:126

Dispatched when a player’s game finds them under another weather region, as they change cell: region is the TESRegion form ID, 0 for none. Its weathers come from World.getRegionWeathers.


playerXpGain: [Player, number]

Defined in: server/api.d.ts:181

Dispatched when the player’s game awards XP: a kill, a quest, a lock, a terminal, a workshop build. amount is the game’s, Intelligence included. Return false to refuse it: their game takes it back.


resourceStart: [string]

Defined in: server/api.d.ts:486

Dispatched after a resource entry point has run and immediately before the resource becomes running.


resourceStop: [string]

Defined in: server/api.d.ts:491

Dispatched while a resource is stopping, before its stop callback, timers, exports and event handlers are cleaned up.


workshopBuild: [Player, number, number, Vector3, Vector3]

Defined in: server/api.d.ts:461

Dispatched when a player builds an object in a settlement, before anyone else sees it. Return false to refuse: their game takes it back out. The recipe’s components are theirs to have spent; the server cannot refund them.


workshopEnter: [Player, number]

Defined in: server/api.d.ts:471

Dispatched when a player enters workshop mode at a workbench, the workbench reference’s form ID.


workshopLeave: [Player, number]

Defined in: server/api.d.ts:476

Dispatched when a player leaves workshop mode, or enters it at another workbench.


workshopMove: [Player, WorkshopItem, Vector3, Vector3]

Defined in: server/api.d.ts:466

Dispatched when a player moves a built object, before anyone else sees it. Return false to refuse: the object is put back where it was for everyone, as a new WorkshopItem, and the old handle reads nothing.


workshopScrap: [Player, WorkshopItem]

Defined in: server/api.d.ts:481

Dispatched when a player scraps or stores a built object, before it goes for everyone. Return false to refuse: the object is put back for everyone, as a new WorkshopItem, and the old handle reads nothing. The player keeps what their game gave them for it.


worldDayChange: [WorldDate, number]

Defined in: server/api.d.ts:131

Dispatched when the running clock passes midnight into a new day, with the new date and day count. World.setDate and World.setDaysPassed do not raise it.


worldHourChange: [number]

Defined in: server/api.d.ts:116

Dispatched when the running clock reaches a new whole hour, 0 to 23. World.setHour does not raise it.


worldLightning: [number]

Defined in: server/api.d.ts:121

Dispatched when the server strikes lightning on its own, for a thundery weather a sky is held to: the World’s, or one a player was given. World.strikeLightning does not raise it.


zoneEnter: [Player, number, string]

Defined in: server/api.d.ts:216

Dispatched when a player comes into a zone Zone.create made, or is in it when it is made.


zoneLeave: [Player, number, string]

Defined in: server/api.d.ts:221

Dispatched when a player goes out of a zone, or the zone is removed around them. A player who leaves the server is not told.