Files
docs/modules/rust/agent/hooks.tsv
wtclaude 4e2c2dc439 docs(modules): mirror the rest of the Oxide ecosystem, and add a machine-readable set
Completes the uMod mirror beyond the Rust hook table, and adds agent/ — the
same facts in TSV/JSONL at ~46% of the tokens.

New prose:
- OXIDE_API.md: the 19 developer pages under umod.org/documentation/api/ —
  plugin structure, hooks, commands, IPlayer, permissions, config, data files,
  database, localization, timers, web requests, dependencies, integration,
  preprocessor directives, security, style guide, CI, review. This is the
  framework our plugin is a guest in, where HOOKS.md is what the game says.
- OPERATING.md: the 6 operator pages — installing Oxide on a server, then
  installing, configuring and permissioning plugins.

New machine-readable set (agent/):
- hooks.tsv    477 rows, ~31% of HOOKS.md
- items.tsv    678 rows, ~80% of DEFINITIONS.md's item table
- skins.tsv    104 rows covering 2,590 skins, ~77%
- api.jsonl    150 code examples, ~47% of the two prose docs
Generated in the same pass as the markdown, so the two cannot drift.

HOOKS.md gains the universal-hook split: 34 of the 477 are uMod's own
Covalence hooks, raised identically on every game uMod supports. Verified
against /documentation/games/universal in the same capture - all 34 are in
the Rust set and the Rust page adds none of its own, so the overlap is exact.
The distinction is architectural: a universal hook is the portable part of
the surface.

Two things worth recording from building it:
- The first skins.tsv was one row per skin and came out 11% LARGER than the
  markdown it replaces. Grouping it one row per item is what made it a
  saving. The token win is real for prose (3.2x on hooks) and small for
  tables that were already dense - agent/README.md says so plainly rather
  than claiming a flat number.
- Signature extraction by brace depth silently captured body lines (a nested
  '}' in OnUserConnected's example ended the block early). It now matches on
  the hook's own name; all 477 rows verified to carry a real signature.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016wDDVXWMDz82WqE1i969r4
2026-09-15 10:01:11 -05:00

77 KiB

1namecategoryuniversalreturnssignaturesdescription
2CanAcceptItemItemdataItemContainer.CanAcceptResult? CanAcceptItem(ItemContainer container, Item item, int targetPos)Called when attempting to put an item in a container
3CanAdministerVendingVendingboolbool CanAdministerVending(BasePlayer player, VendingMachine machine)Called when a player attempts to administer a vending machine
4CanAffordToPlacePlayerboolbool CanAffordToPlace(BasePlayer player, Planner planner, Construction construction)Useful for ignoring resource requirements for placement
5CanAffordUpgradePlayerboolbool CanAffordUpgrade(BasePlayer player, BuildingBlock block, BuildingGrade.Enum grade)Called when the resources for an upgrade are checked
6CanAssignBedPlayernonnullobject CanAssignBed(BasePlayer player, SleepingBag bag, ulong targetPlayerId)Called when a player attempts to assign a bed or sleeping bag to another player
7CanBeTargetedPlayerboolbool CanBeTargeted(BaseCombatEntity player, MonoBehaviour behaviour)Called when an autoturret, flame turret, shotgun trap, or helicopter turret is attempting to target the player
8CanBeWoundedPlayerboolbool CanBeWounded(BasePlayer player, HitInfo info)Called when any damage is attempted on player
9CanBradleyApcTargetEntityboolbool CanBradleyApcTarget(BradleyAPC apc, BaseEntity entity)Called when an APC targets an entity
10CanBuildPlayernonnullobject CanBuild(Planner planner, Construction prefab, Construction.Target target)Called when the player tries to build something
11CanBypassQueuePlayerdatabool CanBypassQueue(Network.Connection connection)Called before the player is added to the connection queue
12CanCatchFishFishingboolbool? CanCatchFish(BasePlayer player, BaseFishingRod rod, Item item)Called before a fish is caught
13CanChangeCodePlayernonnullobject CanChangeCode(BasePlayer player, CodeLock codeLock, string newCode, bool isGuestCode)Called when a player tries to change the code on a codelock
14CanChangeGradePlayerboolbool CanChangeGrade(BasePlayer player, BuildingBlock block, BuildingGrade.Enum grade)Called when a player tries to change a building grade
15CanCheckFuelVehicleboolobject CanCheckFuel(EntityFuelSystem fuelSystem, StorageContainer fuelContainer, BasePlayer player)Called when a player tries to loot a vehicle's fuel container
16CanClientLoginPlayerdataobject CanClientLogin(Network.Connection connection)Called when the player is attempting to login
17CanCombineDroppedItemItemnonnullobject CanCombineDroppedItem(DroppedItem item, DroppedItem targetItem)Called when an item is dropped on another item
18CanCraftPlayerboolbool CanCraft(ItemCrafter itemCrafter, ItemBlueprint bp, int amount) ;; bool CanCraft(PlayerBlueprints playerBlueprints, ItemDefinition itemDefinition, int skinItemId)Called when the player attempts to craft an item
19CanCreateWorldProjectileWeaponnonnullobject CanCreateWorldProjectile(HitInfo info, ItemDefinition itemDef)Called when the item creates a projectile in the world
20CanDemolishPlayerboolbool CanDemolish(BasePlayer player, BuildingBlock block, BuildingGrade.Enum grade)Called when a player tries to demolish a building block
21CanDeployItemPlayernonnullobject CanDeployItem(BasePlayer player, Deployer deployer, NetworkableId entityId)Useful for denying items' deployment
22CanDismountEntityPlayernonnullobject CanDismountEntity(BasePlayer player, BaseMountable entity)Called when the player attempts to dismount an entity
23CanDropActiveItemItemboolbool CanDropActiveItem(BasePlayer player)Called when a player attempts to drop their active item
24CanEntityBeHostileEntitynonnullobject CanEntityBeHostile(BaseCombatEntity entity)Useful for overriding hostility of an entity
25CanEquipItemPlayerboolbool CanEquipItem(PlayerInventory inventory, Item item, int targetPos)Called when the player attempts to equip an item
26CanExplosiveStickWeaponnonnullobject CanExplosiveStick(TimedExplosive explosive, BaseEntity entity)Called when a Timed Explosive is attempting to stick to another entity
27CanHackCratePlayernonnullobject CanHackCrate(BasePlayer player, HackableLockedCrate crate)Called when a player starts hacking a locked crate
28CanHelicopterDropCrateEntityboolbool CanHelicopterDropCrate(CH47HelicopterAIController heli)Called when a CH47 helicopter attempts to drop a crate
29CanHelicopterStrafeEntityboolbool CanHelicopterStrafe(PatrolHelicopterAI heli)Called when a patrol helicopter attempts to strafe
30CanHelicopterStrafeTargetEntityboolbool CanHelicopterStrafeTarget(PatrolHelicopterAI entity, BasePlayer target)Called when a patrol helicopter attempts to target a player to attack while strafing
31CanHelicopterTargetEntityboolbool CanHelicopterTarget(PatrolHelicopterAI heli, BasePlayer player)Called when a patrol helicopter attempts to target a player to attack
32CanHelicopterUseNapalmEntityboolbool CanHelicopterUseNapalm(PatrolHelicopterAI heli)Called when a patrol helicopter attempts to use napalm
33CanHideStashPlayernonnullobject CanHideStash(BasePlayer player, StashContainer stash)Called when a player tries to hide a stash
34CanLockPlayernonnullobject CanLock(BasePlayer player, BaseLock baseLock)Useful for canceling the lock action
35CanLockerAcceptItemEntityboolobject CanLockerAcceptItem(Locker locker, Item item, int targetPos)Called before an item is attempted to be placed inside a locker
36CanLootEntityPlayernonnullobject CanLootEntity(BasePlayer player, DroppedItemContainer container) ;; object CanLootEntity(BasePlayer player, LootableCorpse corpse) ;; object CanLootEntity(BasePlayer player, ResourceContainer container) ;; object CanLootEntity(BasePlayer player, BaseRidableAnimal animal) ;; object CanLootEntity(BasePlayer player, StorageContainer container)Called when the player starts looting a DroppedItemContainer, LootableCorpse, ResourceContainer, BaseRidableAnimal, or StorageContainer entity
37CanLootPlayerPlayerboolbool CanLootPlayer(BasePlayer target, BasePlayer looter)Called when the player attempts to loot another player
38CanMountEntityPlayernonnullobject CanMountEntity(BasePlayer player, BaseMountable entity)Called when the player attempts to mount an entity
39CanMoveItemItemnonnullobject CanMoveItem(Item item, PlayerInventory playerLoot, ItemContainerId targetContainer, int targetSlot, int amount, ItemMoveModifier itemMoveModifier)Called when moving an item from one inventory slot to another
40CanNetworkToEntityboolbool CanNetworkTo(BaseNetworkable entity, BasePlayer target)Called when an entity attempts to network with a player; For better performance, avoid using heavy calculations in this hook.
41CanNpcAttackEntityboolbool CanNpcAttack(BaseNpc npc, BaseEntity target)Called when a NPC attempts to attack another entity
42CanNpcEatEntityboolbool CanNpcEat(BaseNpc npc, BaseEntity target)Called when a NPC attempts to eat another entity
43CanPickupEntityPlayerboolbool CanPickupEntity(BasePlayer player, BaseEntity entity)Called when a player attempts to pickup a deployed entity (AutoTurret, BaseMountable, BearTrap, DecorDeployable, Door, DoorCloser, ReactiveTarget, SamSite, SleepingBag, SpinnerWheel, StorageContainer, etc.)
44CanPickupLockPlayerboolbool CanPickupLock(BasePlayer player, BaseLock baseLock)Called when a player attempts to pickup a lock
45CanPushBoatPlayernonnullobject CanPushBoat(BasePlayer player, MotorRowboat boat)Useful for canceling boat push
46CanReceiveCallPhoneboolobject CanReceiveCall(PhoneController receiverPhone)Called when a player tries to place a phone call
47CanRecycleEntityboolbool CanRecycle(Recycler recycler, Item item)Called when the recycler attempts to recycle an item
48CanRenameBedPlayernonnullobject CanRenameBed(BasePlayer player, SleepingBag bed, string bedName)Called when the player attempts to rename a bed or sleeping bag
49CanResearchItemPlayernonnullobject CanResearchItem(BasePlayer player, Item targetItem)Called when the player attempts to research an item
50CanSamSiteShootEntitynonnullobject CanSamSiteShoot(SamSite samSite)Useful for canceling the shoot of SamSite
51CanSeeStashPlayernonnullobject CanSeeStash(BasePlayer player, StashContainer stash)Called when a player is looking at a hidden stash
52CanSetBedPublicPlayernonnullobject CanSetBedPublic(BasePlayer player, SleepingBag bed)Called when a player tries to set a bed public
53CanSetRelationshipPlayerboolbool? CanSetRelationship(BasePlayer player, BasePlayer otherPlayer, RelationshipManager.RelationshipType relationshipType, int weight)Called when a player's relationship with another is about to be updated
54CanSpectateTargetPlayernonnullobject CanSpectateTarget(BasePlayer player, string filter)Called when spectate target is attempting to update
55CanStackItemItemboolbool CanStackItem(Item item, Item targetItem)Called when moving an item onto another item
56CanSwapToSeatEntityboolbool CanSwapToSeat(BasePlayer player, BaseMountable mountable)Called when a player tries to switch seats, to determine whether each seat is eligible to be swapped to
57CanTakeCuttingResourcenonnullobject CanTakeCutting(BasePlayer player, GrowableEntity entity)Called when a player is trying to take a cutting (clone) of a GrowableEntity
58CanUnlockPlayernonnullobject CanUnlock(BasePlayer player, BaseLock baseLock)Called when the player tries to unlock a keylock or codelock
59CanUnlockTechTreeNodeTechTreeboolobject CanUnlockTechTreeNode(BasePlayer player, TechTreeData.NodeInstance node, TechTreeData techTree)Called when a player is attempting to unlock a blueprint in a tech tree; Useful for bypassing unlock requirements or disallowing particular blueprints from being unlocked
60CanUnlockTechTreeNodePathTechTreeboolobject CanUnlockTechTreeNodePath(BasePlayer player, TechTreeData.NodeInstance node, TechTreeData techTree)Called when a player is attempting to unlock a blueprint in a tech tree, after the `CanUnlockTechTreeNode` hook, when determining whether they have the prerequisite blueprints unlocked; Useful for customizing prerequisites without conflicting with the `CanPlayerUnlock` hook
61CanUpdateSignPlayerboolbool CanUpdateSign(BasePlayer player, Signage sign) ;; bool CanUpdateSign(BasePlayer player, PhotoFrame photoFrame)Called when the player attempts to change the text on a sign or lock it, or update a photo frame
62CanUseFuelVehicleboolobject CanUseFuel(EntityFuelSystem fuelSystem, StorageContainer fuelContainer, float currentSeconds, float fuelPerSecond)Called before a vehicle fuel system consumes fuel
63CanUseGesturePlayerboolbool? CanUseGesture(BasePlayer player, GestureConfig gesture)Called when a player attempts to use a gesture
64CanUseHelicopterVehiclenonnullobject CanUseHelicopter(BasePlayer player, CH47HelicopterAIController helicopter)Useful for denying to mount a CH47 helicopter
65CanUseLockedEntityPlayerboolbool CanUseLockedEntity(BasePlayer player, BaseLock baseLock)Called when the player tries to use an entity that is locked
66CanUseMailboxPlayerboolbool CanUseMailbox(BasePlayer player, Mailbox mailbox)Called when the player tries to use a mailbox
67CanUserLoginPlayer1dataobject CanUserLogin(string name, string id, string ipAddress)Called when a player is attempting to connect to the server
68CanUseUIPlayernonnullobject CanUseUI(BasePlayer player, string json)Called when the player attempts to use a custom UI
69CanUseVendingVendingboolbool CanUseVending(BasePlayer player, VendingMachine machine)Called when a player attempts to use a vending machine
70CanUseWiresPlayernonnullobject CanUseWires(BasePlayer player)Useful for allowing or preventing a player from using wires
71CanVendingAcceptItemVendingboolbool CanVendingAcceptItem(VendingMachine vending, Item item, int targetPos)Called when a player attempts to administer a vending machine
72CanWearItemPlayernonnullobject CanWearItem(PlayerInventory inventory, Item item, int targetSlot)Called when the player attempts to equip an item
73InitServer1nonevoid Init()Called when a plugin is being initialized; Other plugins may or may not be present, dependant on load order
74LoadDefaultConfigPlugin1noneprotected override void LoadDefaultConfig()Called when the config for a plugin should be initialized; Only called if the config file does not already exist
75LoadDefaultMessagesPlugin1noneprotected override void LoadDefaultMessages()Called when the localization for a plugin should be registered
76LoadedPlugin1nonevoid Loaded()Called when a plugin has finished loading; Other plugins may or may not be present, dependant on load order
77OnActiveItemChangePlayernonnullobject OnActiveItemChange(BasePlayer player, Item oldItem, ItemId newItemId)Called when active item is attempting to update
78OnActiveItemChangedPlayernonevoid OnActiveItemChanged(BasePlayer player, Item oldItem, Item newItem)Called when active item was changed
79OnAddVendingOfferVendingnonevoid OnAddVendingOffer(VendingMachine machine, ProtoBuf.VendingMachine.SellOrder sellOrder)Called when a sell order/offer is added to a vending machine
80OnAirdropEntitynonevoid OnAirdrop(CargoPlane plane, Vector3 dropPosition)Called when an airdrop has been called
81OnAmmoSwitchWeaponnonnullobject OnAmmoSwitch(BaseProjectile weapon, BasePlayer player)Called when the player starts to switch the ammo in a weapon
82OnAmmoUnloadWeaponnonnullobject OnAmmoUnload(BaseProjectile projectile, Item item, BasePlayer player)Called when a player is trying to unload ammo
83OnAnalysisCompletePlayernonevoid OnAnalysisComplete(SurveyCrater surveyCrater, BasePlayer player)Called right after a player completes a survey crater analysis
84OnBackpackDropItemdataobject OnBackpackDrop(Item backpack, BasePlayer player)Called just before a backpack is dropped from a player on death.
85OnBigWheelLossEntitynonevoid OnBigWheelLoss(BigWheelGame wheel, Item item)Called when a specific item is lost on the big wheel game
86OnBigWheelWinEntitydataobject OnBigWheelWin(BigWheelGame bigWheel, Item scrap, BigWheelBettingTerminal terminal, int multiplier)Called before multiplier is applied.
87OnBoatPathGenerateVehicledataList<Vector3> OnBoatPathGenerate()Called when generating ocean patrol path for CargoShip
88OnBonusItemDropItemnonnullobject OnBonusItemDrop(Item item, BasePlayer player)Called when a loot container is about to drop bonus scrap for a player who has a corresponding tea buff
89OnBonusItemDroppedItemnonevoid OnBonusItemDropped(Item item, BasePlayer player)Called after a loot container has dropped bonus scrap for a player who has a corresponding tea buff
90OnBookmarkAddEntitynonnullobject OnBookmarkAdd(ComputerStation computerStation, BasePlayer player, string bookmarkName)Called when a player tries to add a bookmark at a computer station
91OnBookmarkControlEntitynonnullobject OnBookmarkControl(ComputerStation computerStation, BasePlayer player, string bookmarkName, IRemoteControllable remoteControllable)Called when a player tries to select a bookmark at a computer station
92OnBookmarkControlEndEntitynonnullobject OnBookmarkControlEnd(ComputerStation computerStation, BasePlayer player, BaseEntity controlledEntity)Called when a player tries to stop viewing/controlling an entity at a computer station
93OnBookmarkControlEndedEntitynonevoid OnBookmarkControlEnded(ComputerStation computerStation, BasePlayer player, BaseEntity controlledEntity)Called after a player has stopped viewing/controlling an entity at a computer station
94OnBookmarkControlStartedEntitynonevoid OnBookmarkControlStarted(ComputerStation computerStation, BasePlayer player, string bookmarkName, IRemoteControllable remoteControllable)Called after a player has selected a bookmark at a computer station
95OnBookmarkDeleteEntitynonnullobject OnBookmarkDelete(ComputerStation computerStation, BasePlayer player, string bookmarkName)Called when a player tries to delete a bookmark at a computer station
96OnBookmarkInputEntitynonnullobject OnBookmarkInput(ComputerStation computerStation, BasePlayer player, InputState inputState)Called when input is received from a player who is using a computer station with a bookmark selected
97OnBookmarksSendControlEntitynonnullobject OnBookmarksSendControl(ComputerStation computerStation, BasePlayer player, string bookmarks)Called when a player is being sent a list of bookmarks for a computer station
98OnBradleyApcHuntEntitynonnullobject OnBradleyApcHunt(BradleyAPC apc)Called when an APC starts hunting
99OnBradleyApcInitializeEntitynonnullobject OnBradleyApcInitialize(BradleyAPC apc)Called when an APC initializes
100OnBradleyApcPatrolEntitynonnullobject OnBradleyApcPatrol(BradleyAPC apc)Called when an APC is starts patrolling
101OnBroadcastCommandPlayernonnullobject OnBroadcastCommand(string command, object[] args)Called before a command is broadcasted to all connected clients
102OnBuildingPrivilegeEntitydataBuildingPrivlidge OnBuildingPrivilege(BaseEntity entity, OBB obb)Useful for overriding a building privilege on specific entities and etc.
103OnBuildingSplitStructurenonevoid OnBuildingSplit(BuildingManager.Building building, uint newBuildingId)Called when a building is split into two
104OnButtonPressEntitynonnullobject OnButtonPress(PressButton button, BasePlayer player)Called when a player is trying to press a button
105OnBuyVendingItemVendingnonnullobject OnBuyVendingItem(VendingMachine machine, BasePlayer player, int sellOrderId, int numberOfTransactions)Called when a player buys an item from a vending machine
106OnCardSwipeItemnonnullobject OnCardSwipe(CardReader cardReader, Keycard card, BasePlayer player)Called when a player is trying to swipe a card
107OnCargoPlaneSignaledEntitynonevoid OnCargoPlaneSignaled(CargoPlane cargoPlane, SupplySignal supplySignal)Called right after a supply signal has called a cargo plane
108OnCCTVDirectionChangeEntitynonnullobject OnCCTVDirectionChange(CCTV_RC camera, BasePlayer player)Called when a player attempts to change the direction of a CCTV camera to face them
109OnCentralizedBanCheckPlayernonnullobject OnCentralizedBanCheck(Network.Connection connection)Called when a player is about to be checked in the centralized ban database
110OnClanColorChangedClannonevoid OnClanColorChanged(LocalClan clan, Color32 color, ulong steamId)Called after a player changes a clan color
111OnClanCreatedClannonevoid OnClanCreated(LocalClan clan, ulong steamId)Called after a player has created a clan
112OnClanDisbandedClannonevoid OnClanDisbanded(LocalClan clan, ulong steamId)Called after a player disbands a clan
113OnClanLogoChangedClannonevoid OnClanLogoChanged(LocalClan clan, byte[] logo, ulong steamId)Called after a player changes a clan logo
114OnClanMemberAddedClannonevoid OnClanMemberAdded(long clanId, ulong steamId)Called after a player has accepted a clan invite
115OnClanMemberKickedClannonevoid OnClanMemberKicked(LocalClan clan, ulong steamId, ulong bySteamId)Called after a player has kicked another player from a clan
116OnClanMemberLeftClannonevoid OnClanMemberLeft(LocalClan clan, ulong steamId)Called after a player has voluntarily left a clan
117OnClientAuthPlayernonevoid OnClientAuth(Connection connection)Called when the player is giving server connection authorization information
118OnClientCommandPlayernonnullobject OnClientCommand(Connection connection, string command)Useful for intercepting players' commands before their handling; Called before OnPlayerCommand and OnUserCommand
119OnCodeEnteredStructurenonnullobject OnCodeEntered(CodeLock codeLock, BasePlayer player, string code)Called when the player has entered a code in a codelock
120OnCollectiblePickupResourcenonnullobject OnCollectiblePickup(CollectibleEntity collectible, BasePlayer player)Called when the player collects an item
121OnConstructionPlaceStructurenonnullobject OnConstructionPlace(BaseEntity entity, Construction component, Construction.Target constructionTarget, BasePlayer player)Called when a player tries to place a building block
122OnContainerDropItemsEntitynonnullobject OnContainerDropItems(ItemContainer container)Called when a container is destroyed and all items are about to be dropped
123OnCorpsePopulatePlayerdataBaseCorpse OnCorpsePopulate(BasePlayer npcPlayer, BaseCorpse corpse)Called when an NPC player corpse is about to be populated with loot
124OnCounterModeToggleEntitynonnullobject OnCounterModeToggle(PowerCounter counter, BasePlayer player, bool mode)Called when a player ties to toggle a power counter between modes
125OnCounterTargetChangeEntitynonnullobject OnCounterTargetChange(PowerCounter counter, BasePlayer player, int targetNumber)Called when a player tries to change the target number of a power counter
126OnCrateDroppedEntitynonevoid OnCrateDropped(HackableLockedCrate crate)Called when a locked crate from the CH47 (Chinook) has dropped
127OnCrateHackEntitynonevoid OnCrateHack(HackableLockedCrate crate)Called when a player starts hacking a locked crate
128OnCrateHackEndEntitynonevoid OnCrateHackEnd(HackableLockedCrate crate)Called when a player stops hacking a locked crate
129OnCrateLandedEntitynonevoid OnCrateLanded(HackableLockedCrate crate)Called when a locked crate from the CH47 (Chinook) has landed
130OnCupboardAuthorizeStructurenonnullobject OnCupboardAuthorize(BuildingPrivlidge privilege, BasePlayer player)Called when a cupboard attempts to authorize a player
131OnCupboardClearListStructurenonnullobject OnCupboardClearList(BuildingPrivlidge privilege, BasePlayer player)Called when an attempt is made to clear a cupboard authorized list
132OnCupboardDeauthorizeStructurenonnullobject OnCupboardDeauthorize(BuildingPrivlidge privilege, BasePlayer player)Called when a cupboard attempts to deauthorize a player
133OnDefaultItemsReceivePlayernonnullobject OnDefaultItemsReceive(PlayerInventory inventory)Called when a player is about to receive default items
134OnDefaultItemsReceivedPlayernonnullvoid OnDefaultItemsReceived(PlayerInventory inventory)Called after a player has received default items
135OnDeleteVendingOfferVendingnonevoid OnDeleteVendingOffer(VendingMachine machine, int offerId)Called when a sell order/offer is deleted from a vending machine
136OnDemoRecordingStartPlayernonnullobject OnDemoRecordingStart(string filename, BasePlayer player)Called right before a demo of a player starts recording
137OnDemoRecordingStartedPlayernonevoid OnDemoRecordingStarted(string filename, BasePlayer player)Called after a demo of a player has started recording
138OnDemoRecordingStopPlayernonnullobject OnDemoRecordingStop(string filename, BasePlayer player)Called right before a demo of a player stops recording
139OnDemoRecordingStoppedPlayernonevoid OnDemoRecordingStopped(string filename, BasePlayer player)Called after a demo of a player has stopped recording
140OnDestroyUIPlayernonevoid OnDestroyUI(BasePlayer player, string json)Called when a custom UI is destroyed for the player
141OnDieselEngineToggleEntitynonnullobject OnDieselEngineToggle(DieselEngine engine, BasePlayer player)Called when a player is trying to toggle diesel engine
142OnDieselEngineToggledEntitynonevoid OnDieselEngineToggled(DieselEngine engine)Called when diesel engine is toggled
143OnDispenserBonusResourcedatavoid OnDispenserBonus(ResourceDispenser dispenser, BasePlayer player, Item item)Called before the player is given a bonus item for gathering
144OnDispenserGatherResourcenonnullobject OnDispenserGather(ResourceDispenser dispenser, BasePlayer player, Item item)Called before the player is given items from a resource
145OnDoorClosedStructurenonevoid OnDoorClosed(Door door, BasePlayer player)Called when the player closed a door
146OnDoorKnockedStructurenonevoid OnDoorKnocked(Door door, BasePlayer player)Called when the player knocks on a door
147OnDoorOpenedStructurenonevoid OnDoorOpened(Door door, BasePlayer player)Called when the player opened a door
148OnElevatorButtonPressEntitynonnullobject OnElevatorButtonPress(ElevatorLift lift, BasePlayer player, Elevator.Direction direction, bool toTopOrBottom)Called when a player presses a button on an elevator lift
149OnElevatorCallEntitynonnullobject OnElevatorCall(Elevator elevator, Elevator topElevator)Called when an elevator lift is called to a specific floor by electricity
150OnElevatorMoveEntitynonnullobject OnElevatorMove(Elevator topElevator, int targetFloor)Called right before an elevator starts moving to the target floor
151OnEngineLoadoutRefreshEntitynonnullobject OnEngineLoadoutRefresh(EngineStorage storage)Called before engine loadout data is refreshed
152OnEngineStartVehiclenonnullobject OnEngineStart(BaseVehicle vehicle, BasePlayer driver)Called when a player tries to start a vehicle engine
153OnEngineStartedVehiclenonevoid OnEngineStarted(BaseVehicle vehicle, BasePlayer driver)Called right after a vehicle engine has started
154OnEngineStatsRefreshVehiclenonnullobject OnEngineStatsRefresh(VehicleModuleEngine engineModule, EngineStorage engineStorage)Called right before the stats of a modular car engine are refreshed
155OnEngineStatsRefreshedVehiclenonevoid OnEngineStatsRefreshed(VehicleModuleEngine engineModule, EngineStorage engineStorage)Called right after the stats of a modular car engine are refreshed
156OnEngineStopVehiclenonnullobject OnEngineStop(BaseVehicle vehicle)Called when a vehicle engine is about to stop
157OnEngineStoppedVehiclenonevoid OnEngineStopped(BaseVehicle vehicle)Called right after a vehicle engine has stopped
158OnEntityBuiltStructurenonevoid OnEntityBuilt(Planner plan, GameObject go)Called when any structure is built (walls, ceilings, stairs, etc.)
159OnEntityControlEntityboolobject OnEntityControl(IRemoteControllable entity)Called when a player tries to remote control an entity
160OnEntityDeathEntitynonevoid OnEntityDeath(BaseCombatEntity entity, HitInfo info)HitInfo might be null, check it before use; Editing hitInfo has no effect because the death has already happened
161OnEntityDestroyEntitynonnullobject OnEntityDestroy(BaseCombatEntity entity)Called right before a CH47Helicopter or BradleyAPC is destroyed
162OnEntityDismountedEntitynonevoid OnEntityDismounted(BaseMountable entity, BasePlayer player)Called when an entity is dismounted by a player
163OnEntityEnterEntitynonevoid OnEntityEnter(TriggerBase trigger, BaseEntity entity)Called when an entity enters a trigger (water area, radiation zone, hurt zone, etc.)
164OnEntityFlagsNetworkUpdateEntitynonnullobject OnEntityFlagsNetworkUpdate(BaseEntity entity)Called after an entity's flags have been updated on the server, before they are sent over the network
165OnEntityGroundMissingEntitynonnullobject OnEntityGroundMissing(BaseEntity entity)Called when an entity (sleepingbag, sign, furnace,...) is going to be destroyed because the buildingblock it is on was removed
166OnEntityKillEntitynonnullobject OnEntityKill(BaseNetworkable entity)Called when an entity is destroyed
167OnEntityLeaveEntitynonevoid OnEntityLeave(TriggerBase trigger, BaseEntity entity)Called when an entity leaves a trigger (water area, radiation zone, hurt zone, etc.)
168OnEntityMarkHostileEntitynonnullobject OnEntityMarkHostile(BaseCombatEntity entity, float duration)Useful for denying marking the entity hostile
169OnEntityMountedEntitynonevoid OnEntityMounted(BaseMountable entity, BasePlayer player)Called when an entity is mounted by a player
170OnEntitySavedEntitynonevoid OnEntitySaved(BaseNetworkable entity, BaseNetworkable.SaveInfo saveInfo)Called after a BaseNetworkable has been saved to a ProtoBuf object and is about to be serialized to a network stream or network cache
171OnEntitySnapshotEntitynonnullobject OnEntitySnapshot(BaseNetworkable entity, Connection connection)Called when an entity snapshot is about to be sent to a client connection
172OnEntitySpawnedEntitynonevoid OnEntitySpawned(BaseNetworkable entity)Called after any networked entity has spawned (including trees)
173OnEntityStabilityCheckEntitynonnullobject OnEntityStabilityCheck(StabilityEntity entity)Called when stability of an entity is checked
174OnEntityTakeDamageEntity?object OnEntityTakeDamage(BaseCombatEntity entity, HitInfo info)Alternatively, modify the HitInfo object to change the damage; It should be okay to set the damage to 0, but if you don't return non-null, the player's client will receive a damage indicator (if entity is a BasePlayer); HitInfo has all kinds of useful things in it, such as Weapon, damageProperties or damageTypes
175OnExcavatorGatherEntitynonnullobject OnExcavatorGather(ExcavatorArm arm, Item item)Called right before moving gathered resource to container
176OnExcavatorMiningToggledEntitynonevoid OnExcavatorMiningToggled(ExcavatorArm arm)Called when excavator mining arm is toggled
177OnExcavatorResourceSetEntitynonnullobject OnExcavatorResourceSet(ExcavatorArm arm, string resourceName, BasePlayer player)Called when a player is trying to set a new resource target
178OnExcavatorSuppliesRequestElectronicdataobject OnExcavatorSuppliesRequest(ExcavatorSignalComputer computer, BasePlayer player)Called just after the excavator supply computer is triggered, before the plane is spawned.
179OnExcavatorSuppliesRequestedElectronic?void OnExcavatorSuppliesRequested(ExcavatorSignalComputer computer, BasePlayer player, BaseEntity cargoPlane)Called after the excavator signal computer was triggered, just after the supply plane is spawned.
180OnExperimentEndPlayernonnullobject OnExperimentEnd(Workbench workbench)Called when an experiment is about to end
181OnExperimentEndedPlayernonevoid OnExperimentEnded(Workbench workbench)Called after the experiment has finished
182OnExperimentStartPlayernonnullobject OnExperimentStart(Workbench workbench, BasePlayer player)Called when the player attempts to experiment with at a workbench
183OnExperimentStartedPlayernonevoid OnExperimentStarted(Workbench workbench, BasePlayer player)Called after the experimentation has started
184OnExplosiveDroppedWeaponnonevoid OnExplosiveDropped(BasePlayer player, BaseEntity entity, ThrownWeapon item)Called when the player drops an explosive item (C4, grenade, ...)
185OnExplosiveDudWeaponnonnullobject OnExplosiveDud(DudTimedExplosive explosive)Called when explosive tries to become dud
186OnExplosiveFuseSetWeaponnonnullobject OnExplosiveFuseSet(TimedExplosive explosive, float fuseLength)Called when a fuse of an explosive is set
187OnExplosiveThrownWeaponnonevoid OnExplosiveThrown(BasePlayer player, BaseEntity entity, ThrownWeapon item)Called when the player throws an explosive item (C4, grenade, ...)
188OnFindBurnableItemdataItem OnFindBurnable(BaseOven oven)Called when looking for fuel for the oven
189OnFindSpawnPointPlayerdatavoid OnFindSpawnPoint(BasePlayer player)Useful for controlling player spawnpoints (like making all spawns occur in a set area)
190OnFireBallDamageEntitynonevoid OnFireBallDamage(FireBall fire, BaseCombatEntity entity, HitInfo info)Called when a fire ball does damage to another entity
191OnFireBallSpreadEntitynonevoid OnFireBallSpread(FireBall ball, BaseEntity fire)Called when a fire ball fire spreads
192OnFishCatchFishingnonnullItem OnFishCatch(Item item, BaseFishingRod rod, BasePlayer player)Called after a fish is caught, before the item is given
193OnFishCaughtFishingnonevoid OnFishCaught(ItemDefinition definition, BaseFishingRod rod, BasePlayer player)Called after a fish is caught
194OnFishingStoppedFishingnonevoid OnFishingStopped(BaseFishingRod rod, BaseFishingRod.FailReason reason)Called just after the fishing minigame has been stopped.
195OnFlameExplosionEntitynonevoid OnFlameExplosion(FlameExplosive explosive, BaseEntity flame)Called when a flame explodes
196OnFlameThrowerBurnWeaponnonevoid OnFlameThrowerBurn(FlameThrower thrower, BaseEntity flame)Called when the burn from a flame thrower spreads
197OnFrameServer1nonevoid OnFrame()Called each frame
198OnFuelAmountCheckVehicledataobject OnFuelAmountCheck(EntityFuelSystem fuelSystem, Item fuelItem)Called when the amount of fuel in a vehicle is being determined
199OnFuelCheckVehicleboolobject OnFuelCheck(EntityFuelSystem fuelSystem)Called when determining whether a vehicle has sufficient fuel
200OnFuelConsumeItemnonnullobject OnFuelConsume(BaseOven oven, Item fuel, ItemModBurnable burnable)Called right before fuel is used (furnace, lanterns, camp fires, etc.)
201OnFuelConsumedItemnonevoid OnFuelConsumed(BaseOven oven, Item fuel, ItemModBurnable burnable)Called after fuel is used (furnace, lanterns, camp fires, etc.)
202OnFuelItemCheckVehicledataobject OnFuelItemCheck(EntityFuelSystem fuelSystem, StorageContainer fuelContainer)Called when determining which item should be used to fuel a vehicle
203OnGiveSoldItemVendingnonnullobject OnGiveSoldItem(NPCVendingMachine vending, Item soldItem, BasePlayer buyer) ;; object OnGiveSoldItem(VendingMachine vending, Item soldItem, BasePlayer buyer)Called before a sold item is given
204OnGroupCreatedPermission1nonevoid OnGroupCreated(string name)Called when a group has been created successfully
205OnGroupDeletedPermission1nonevoid OnGroupDeleted(string name)Called when a group has been deleted successfully
206OnGroupParentSetPermission1nonevoid OnGroupParentSet(string name, string parent)Called when a group parent has been updated
207OnGroupPermissionGrantedPermission1nonevoid OnGroupPermissionGranted(string name, string perm)Called when a permission has been granted to a group
208OnGroupPermissionRevokedPermission1nonevoid OnGroupPermissionRevoked(string name, string perm)Called when a permission has been revoked from a group
209OnGroupRankSetPermission1nonevoid OnGroupRankSet(string name, int rank)Called when a group rank has been updated
210OnGroupTitleSetPermission1nonevoid OnGroupTitleSet(string name, string title)Called when a group title has been updated
211OnGrowableGatherResourcenonnullobject OnGrowableGather(GrowableEntity plant, BasePlayer player)Called when the player gathers a growable entity
212OnGrowableGatheredResourcenonevoid OnGrowableGathered(GrowableEntity plant, Item item, BasePlayer player)Called before the player receives an item from gathering a growable entity
213OnHammerHitStructurenonnullobject OnHammerHit(BasePlayer player, HitInfo info)Called when the player has hit something with a hammer
214OnHealingItemUseItemnonnullobject OnHealingItemUse(MedicalTool tool, BasePlayer player)Called when a player attempts to use a medical tool
215OnHelicopterAttackEntitynonnullobject OnHelicopterAttack(CH47HelicopterAIController heli)Called when a CH47 helicopter is being attacked
216OnHelicopterDropCrateEntitynonnullobject OnHelicopterDropCrate(CH47HelicopterAIController heli)Called when a CH47 helicopter is dropping a crate
217OnHelicopterDropDoorOpenEntitynonnullobject OnHelicopterDropDoorOpen(CH47HelicopterAIController heli)Called when a CH47 helicopter is opening its drop door
218OnHelicopterKilledEntitynonnullobject OnHelicopterKilled(CH47HelicopterAIController heli)Called when a CH47 helicopter is going to be killed
219OnHelicopterOutOfCratesEntityboolbool? OnHelicopterOutOfCrates(CH47HelicopterAIController heli)Called when a CH47 helicopter runs out of crates
220OnHelicopterRetireEntitynonnullobject OnHelicopterRetire(PatrolHelicopterAI helicopter)Called before the patrol helicopter starts leaving the map.
221OnHelicopterStrafeEnterEntitynonnullobject OnHelicopterStrafeEnter(PatrolHelicopterAI helicopter, Vector3 strafePosition)Called when helicopter is entering strafe
222OnHelicopterTargetEntitynonnullobject OnHelicopterTarget(HelicopterTurret turret, BaseCombatEntity entity)Called when a helicopter turret attempts to target an entity
223OnHorseHitchEntitynonnullobject OnHorseHitch(RidableHorse horse, HitchTrough hitch)Called just before setting the hitch
224OnHorseLeadEntitynonnullobject OnHorseLead(BaseRidableAnimal animal, BasePlayer player)Called when a player tries to lead a horse
225OnHotAirBalloonToggleVehiclenonnullobject OnHotAirBalloonToggle(HotAirBalloon balloon, BasePlayer player)Called when a player tries to toggle a hot air balloon on or off
226OnHotAirBalloonToggledVehiclenonevoid OnHotAirBalloonToggled(HotAirBalloon balloon, BasePlayer player)Called right after a player has toggled a hot air balloon on or off
227OnIngredientsCollectItemnonnullbool? OnIngredientsCollect(ItemCrafter itemCrafter, ItemBlueprint blueprint, ItemCraftTask task, int amount, BasePlayer player)Called when ingredients are about to be collected for crafting an item
228OnInputUpdateEntitynonnullobject OnInputUpdate(IOEntity entity, int inputAmount, int slot)Called when an input of IOEntity is updated
229OnInventoryNetworkUpdatePlayernonnullobject OnInventoryNetworkUpdate(PlayerInventory inventory, ItemContainer container, ProtoBuf.UpdateItemContainer updateItemContainer, PlayerInventory.Type type, PlayerInventory.PlayerInventory.NetworkInventoryMode networkInventoryMode)Called after a player's inventory contents have changed, before it is sent over the network to one or more clients
230OnIORefClearedEntitynonevoid OnIORefCleared(IOEntity.IORef ioRef, IOEntity ioEntity)Called after a wire has been disconnected from an electrical entity, such as when its connected entity was destroyed or when a player removed the wire
231OnItemActionItemnonnullobject OnItemAction(Item item, string action, BasePlayer player)Called when a button is clicked on an item in the inventory (drop, unwrap, ...)
232OnItemAddedToContainerItemnonevoid OnItemAddedToContainer(ItemContainer container, Item item)Called right after an item was added to a container; An entire stack has to be created, not just adding more wood to a wood stack for example
233OnItemCraftItemboolobject OnItemCraft(ItemCraftTask task, BasePlayer player, Item item)Called just before an item is added to the crafting queue
234OnItemCraftCancelledItemnonevoid OnItemCraftCancelled(ItemCraftTask task)Called before an item has been crafted
235OnItemCraftFinishedItemnonevoid OnItemCraftFinished(ItemCraftTask task, Item item)Called right after an item has been crafted
236OnItemDeployedItemnonevoid OnItemDeployed(Deployer deployer, BaseEntity entity, BaseEntity slotEntity)Called right after an item has been deployed
237OnItemDroppedItemnonevoid OnItemDropped(Item item, BaseEntity entity)Called right after an item has been dropped
238OnItemLockItemnonnullobject OnItemLock(Item item)Called right before an item is locked, such as in a modular car inventory
239OnItemPickupItemnonnullobject OnItemPickup(Item item, BasePlayer player)Called right after an item has been picked up
240OnItemRecycleEntitynonnullobject OnItemRecycle(Item item, Recycler recycler)Called when an item is recycled in a recycler
241OnItemRefillItemnonnullobject OnItemRefill(Item item, BasePlayer player)Called right before an item such as a diving tank is repaired without using a repair bench
242OnItemRemoveItemdataobject OnItemRemove(Item item) ;; void OnItemRemove(Item item)Called before an item is destroyed
243OnItemRemovedFromContainerItemnonevoid OnItemRemovedFromContainer(ItemContainer container, Item item)Called right after an item was removed from a container; The entire stack has to be removed for this to be called, not just a little bit
244OnItemRepairItemnonnullobject OnItemRepair(BasePlayer player, Item item)Called right before an item is repaired
245OnItemResearchItemnonevoid OnItemResearch(ResearchTable table, Item targetItem, BasePlayer player)Called right before a player begins to research an item
246OnItemResearchedItemdatafloat OnItemResearched(ResearchTable table, float chance)Called right before a player finishes researching an item
247OnItemSplitItemdataItem OnItemSplit(Item item, int amount)Called right before an item is split into multiple stacks
248OnItemStackedItemnonevoid OnItemStacked(Item destinationItem, Item sourceItem, ItemContainer destinationContainer)Called after an item has been stacked
249OnItemSubmitItemnonnullobject OnItemSubmit(Item item, Mailbox mailbox, BasePlayer player)Called when a player submits an item into a mailbox or dropbox
250OnItemUnlockItemnonnullobject OnItemUnlock(Item item)Called right before an item is unlocked, such as in a modular car inventory
251OnItemUpgradeItemnonevoid OnItemUpgrade(Item item, Item upgraded, BasePlayer player)Called right before an item is upgraded
252OnItemUseItemdataint OnItemUse(Item item, int amountToUse)Called when an item is used
253OnLiftUseEntitynonnullobject OnLiftUse(Lift lift, BasePlayer player) ;; object OnLiftUse(ProceduralLift lift, BasePlayer player)Called when a player calls a lift or procedural lift
254OnLiquidVesselFillEntitynonnullobject OnLiquidVesselFill(BaseLiquidVessel liquidVessel, BasePlayer player, LiquidContainer facingLiquidContainer)Called when a player is attempting to fill a liquid vessel
255OnLootEntityPlayernonevoid OnLootEntity(BasePlayer player, BaseEntity entity)Called when the player starts looting an entity
256OnLootEntityEndPlayernonevoid OnLootEntityEnd(BasePlayer player, BaseCombatEntity entity)Called when the player stops looting an entity
257OnLootItemPlayernonevoid OnLootItem(PlayerLoot playerLoot, Item item)Called when the player starts looting an item
258OnLootNetworkUpdatePlayernonnullobject OnLootNetworkUpdate(PlayerLoot loot)Called when a player is trying to loot a container or a container they are looting has changed its contents
259OnLootPlayerPlayernonevoid OnLootPlayer(BasePlayer player, BasePlayer target)Called when the player starts looting another player
260OnLootSpawnEntitynonnullobject OnLootSpawn(LootContainer container)Called when loot spawns in a container
261OnLoseConditionItemnonevoid OnLoseCondition(Item item, ref float amount)Called right before the condition of the item is modified
262OnMagazineReloadWeaponnonnullobject OnMagazineReload(BaseProjectile weapon, IAmmoContainer desiredAmount, BasePlayer player)Called when the player reloads a magazine
263OnMapImageUpdatedItemnonevoid OnMapImageUpdated()Called when player updates map item's image; Useful for executing any action when map image is updated
264OnMapMarkerAddPlayernonnullobject OnMapMarkerAdd(BasePlayer player, MapNote note)Called when trying to add a marker
265OnMapMarkerAddedPlayernonevoid OnMapMarkerAdded(BasePlayer player, MapNote note)Called after a marker was added
266OnMapMarkerRemovePlayernonnullobject OnMapMarkerRemove(BasePlayer player, MapNote note)Called when trying to remove a marker
267OnMapMarkersClearPlayernonnullobject OnMapMarkersClear(BasePlayer player, List<MapNote> notes)Called when trying to clear map markers
268OnMapMarkersClearedPlayernonevoid OnMapMarkersCleared(BasePlayer player, List<MapNote> notes)Called after markers were cleared
269OnMaxStackableItemdataint OnMaxStackable(Item item)Called when an items max stackable is calculated
270OnMeleeAttackPlayernonnullobject OnMeleeAttack(BasePlayer player, HitInfo info)Useful for canceling melee attacks
271OnMeleeThrownWeaponnonevoid OnMeleeThrown(BasePlayer player, Item item)Called when the player throws a melee item (axe, rock, ...)
272OnMessagePlayerServernonnullobject OnMessagePlayer(string message, BasePlayer player)Useful for intercepting server messages before they get to their intended target
273OnMlrsFireEntitynonnullobject OnMlrsFire(MLRS mlrs, BasePlayer player)Called just before the MLRS is fired.
274OnMlrsFiredEntitynonevoid OnMlrsFired(MLRS mlrs, BasePlayer player)Called just after the MLRS has been fired.
275OnNetworkGroupEnteredPlayernonevoid OnNetworkGroupEntered(BasePlayer player, Network.Visibility.Group group)Called after a player has entered a network group
276OnNetworkGroupLeftPlayernonevoid OnNetworkGroupLeft(BasePlayer player, Network.Visibility.Group group)Called after a player has left a network group
277OnNetworkSubscriptionsUpdateEntitynonnullobject OnNetworkSubscriptionsUpdate(Network.Networkable networkable, List<Network.Visibility.Group> groupsToAdd, List<Network.Visibility.Group> groupsToRemove)Called after the Rust has determined which network groups to subscribe a player to (`groupsToAdd`), and which network groups to unsubscribe the player from (`groupsToRemove`); This hook is useful for situations where you want to subscribe a player to a network group that is outside their network range -- To do so, you can prevent Rust from automatically unsubscribing them by removing that group from the `groupsToRemove` list
278OnNewSaveServernonevoid OnNewSave(string filename)Called when a new savefile is created (usually when map has wiped)
279OnNpcConversationEndedPlayernonevoid OnNpcConversationEnded(NPCTalking npcTalking, BasePlayer player)Called right after a player has ended an NPC conversation
280OnNpcConversationRespondPlayernonnullobject OnNpcConversationRespond(NPCTalking npcTalking, BasePlayer player, ConversationData conversationData, ConversationData.ResponseNode responseNode)Called when a player chooses an NPC conversation response
281OnNpcConversationRespondedPlayernonevoid OnNpcConversationResponded(NPCTalking npcTalking, BasePlayer player, ConversationData conversationData, ConversationData.ResponseNode responseNode)Called right after a player's chosen NPC conversation response has been processed
282OnNpcConversationStartPlayernonnullobject OnNpcConversationStart(NPCTalking npcTalking, BasePlayer player, ConversationData conversationData)Called when a player tries to start a conversation with an NPC
283OnNpcDestinationSetEntitynonnullobject OnNpcDestinationSet(NPCPlayerApex npc, Vector3 newPosition)Useful for canceling the destination change on NPCs
284OnNpcGiveSoldItemVendingnonnullobject OnNpcGiveSoldItem(NPCVendingMachine machine, Item soldItem, BasePlayer buyer)Called before a non-player controlled vending machine (at outpost etc.) gives the player the item they purchased.
285OnNpcPlayerResumeEntitynonnullobject OnNpcPlayerResume(NPCPlayerApex npc)Useful for canceling the invoke of TryForceToNavmesh
286OnNpcStopMovingEntitynonnullobject OnNpcStopMoving(NPCPlayerApex npc)Useful for denying the move stop of NPCs
287OnNpcTargetEntitynonnullobject OnNpcTarget(BaseEntity npc, BaseEntity entity)Called when an NPC targets another entity
288OnNpcTargetSenseEntitynonnullobject OnNpcTargetSense(BaseEntity owner, BaseEntity entity, AIBrainSenses brainSenses)Called when an NPC becomes aware of another entity
289OnOpenVendingAdminVendingnonevoid OnOpenVendingAdmin(VendingMachine machine, BasePlayer player)Called when a player opens the admin ui for a vending machine
290OnOutputUpdateEntitynonnullobject OnOutputUpdate(IOEntity entity)Called when outputs of IOEntity are updated
291OnOvenCookEntitynonnullobject OnOvenCook(BaseOven oven, Item item)Called before an oven cooks an item
292OnOvenCookedEntitynonevoid OnOvenCooked(BaseOven oven, Item item, BaseEntity slot)Called after an oven cooks an item
293OnOvenToggleEntitynonnullobject OnOvenToggle(BaseOven oven, BasePlayer player)Called when an oven (Campfire, Furnace,...) is turned on or off
294OnPayForPlacementPlayernonnullobject OnPayForPlacement(BasePlayer player, Planner planner, Construction construction)Called when a player is paying for placement. Useful for preventing paying for placing deployables, building blocks and etc
295OnPayForUpgradePlayernonnullobject OnPayForUpgrade(BasePlayer player, BuildingBlock block, ConstructionGrade gradeTarget)Called when player is paying for an upgrade. Useful for preventing paying for block upgrade
296OnPermissionRegisteredPermission1nonevoid OnPermissionRegistered(string name, Plugin owner)Called when a permission has been registered
297OnPhoneAnswerPhonenonnullobject OnPhoneAnswer(PhoneController receiverPhone, PhoneController callerPhone)Called when a player tries to answer a phone call
298OnPhoneAnsweredPhonenonevoid OnPhoneAnswered(PhoneController receiverPhone, PhoneController callerPhone)Called right after a player has answered a phone call
299OnPhoneCallStartPhonenonnullobject OnPhoneCallStart(PhoneController phone, PhoneController otherPhone, BasePlayer player)Called after a phone has been answered, right before voice communication is established
300OnPhoneCallStartedPhone?void OnPhoneCallStarted(PhoneController phone, PhoneController otherPhone, BasePlayer player)Called right after a phone call has been answered and voice communication has been established
301OnPhoneDialPhonenonnullobject OnPhoneDial(PhoneController callerPhone, PhoneController receiverPhone, BasePlayer player)Called when a player places a phone call
302OnPhoneDialFailPhonenonnullobject OnPhoneDialFail(PhoneController phone, Telephone.DialFailReason reason, BasePlayer player)Called when a phone call is about to end or fail to start
303OnPhoneDialFailedPhonenonevoid OnPhoneDialFailed(PhoneController phone, Telephone.DialFailReason reason, BasePlayer player)Called after a phone call has ended or failed to start
304OnPhoneDialTimedOutPhonenonevoid OnPhoneDialTimedOut(PhoneController callerPhone, PhoneController receiverPhone, BasePlayer player)Called right after a phone was automatically hung up because the receiver phone wasn't answered in time
305OnPhoneDialTimeoutPhonenonnullobject OnPhoneDialTimeout(PhoneController callerPhone, PhoneController receiverPhone, BasePlayer player)Called when a phone is about to automatically hang up because the receiver phone wasn't answered in time
306OnPhoneNameUpdatePhonenonnullobject OnPhoneNameUpdate(PhoneController phoneController, string name, BasePlayer player)Called when a player tries to update a phone name
307OnPhoneNameUpdatedPhonenonevoid OnPhoneNameUpdated(PhoneController phoneController, string name, BasePlayer player)Called after a player has updated a phone name
308OnPlayerAddModifiersPlayernonnullobject OnPlayerAddModifiers(BasePlayer player, Item item, ItemModConsumable consumable)Called after a player consumes an item such as tea that is about to apply modifiers
309OnPlayerAssistPlayernonnullobject OnPlayerAssist(BasePlayer target, BasePlayer player)Called when a player tries to assist target player (when target is wounded)
310OnPlayerAttackPlayernonnullobject OnPlayerAttack(BasePlayer attacker, HitInfo info)Useful for modifying an attack before it goes out; hitInfo.HitEntity should be the entity that this attack would hit
311OnPlayerBannedPlayernonevoid OnPlayerBanned(string name, ulong id, string address, string reason)Called when the player is banned (Facepunch, EAC, server ban, etc.)
312OnPlayerChatPlayernonnullobject OnPlayerChat(BasePlayer player, string message, Chat.ChatChannel channel)Called when the player sends chat to the server
313OnPlayerCommandPlayernonnullobject OnPlayerCommand(BasePlayer player, string command, string[] args)Useful for intercepting players' commands before their handling
314OnPlayerConnectedPlayernonevoid OnPlayerConnected(BasePlayer player)Called after the player object is created, but before the player has spawned
315OnPlayerCorpsePlayernonevoid OnPlayerCorpse(BasePlayer player, BaseCorpse corpse)Called when a non-null corpse has just been spawned
316OnPlayerCorpseSpawnPlayernonnullobject OnPlayerCorpseSpawn(BasePlayer player)Called when a non-null corpse is about to spawn
317OnPlayerCorpseSpawnedPlayernonevoid OnPlayerCorpseSpawned(BasePlayer player, PlayerCorpse corpse)Called when a non-null corpse has just been spawned
318OnPlayerDeathPlayernonnullobject OnPlayerDeath(BasePlayer player, HitInfo info)Called when the player is about to die; HitInfo may be null sometimes
319OnPlayerDisconnectedPlayernonevoid OnPlayerDisconnected(BasePlayer player, string reason)Called after the player has disconnected from the server
320OnPlayerDropActiveItemPlayernonevoid OnPlayerDropActiveItem(BasePlayer player, Item item)Called when the player drops their active held item
321OnPlayerHealthChangePlayernonnullobject OnPlayerHealthChange(BasePlayer player, float oldValue, float newValue)Called just before the player's health changes
322OnPlayerInputPlayernonevoid OnPlayerInput(BasePlayer player, InputState input)Called when input is received from a connected client
323OnPlayerKickedPlayernonevoid OnPlayerKicked(BasePlayer player, string reason)Called after the player is kicked from the server
324OnPlayerLandPlayernonnullobject OnPlayerLand(BasePlayer player, float num)Called just before the player lands on the ground
325OnPlayerLandedPlayernonevoid OnPlayerLanded(BasePlayer player, float num)Called when the player landed on the ground
326OnPlayerLootEndPlayernonevoid OnPlayerLootEnd(PlayerLoot inventory)Called when the player stops looting
327OnPlayerMetabolizePlayernonevoid OnPlayerMetabolize(PlayerMetabolism metabolism, BaseCombatEntity entity, float delta)Called after the player's metabolism has been changed
328OnPlayerRecoverPlayernonnullobject OnPlayerRecover(BasePlayer player)Called when the player is about to recover from the 'wounded' state
329OnPlayerRecoveredPlayernonevoid OnPlayerRecovered(BasePlayer player)Called when the player was recovered
330OnPlayerReportedPlayernonevoid OnPlayerReported(BasePlayer reporter, string targetName, string targetId, string subject, string message, string type)Called when a player has reported someone via F7
331OnPlayerRespawnPlayerdataobject OnPlayerRespawn(BasePlayer player, BasePlayer.SpawnPoint spawnPoint) ;; object OnPlayerRespawn(BasePlayer player, SleepingBag sleepingBag)Called when a player is attempting to respawn
332OnPlayerRevivePlayernonnullobject OnPlayerRevive(BasePlayer reviver, BasePlayer player)Called before the recover after reviving with a medical tool; Useful for canceling the reviving
333OnPlayerSetInfoPlayernonevoid OnPlayerSetInfo(Connection connection, string key, string value)Called when setting player's information *(aka console variables)*
334OnPlayerSleepPlayernonnullobject OnPlayerSleep(BasePlayer player)Called when the player is about to go to sleep
335OnPlayerSleepEndedPlayernonevoid OnPlayerSleepEnded(BasePlayer player)Called when the player awakes
336OnPlayerSpawnPlayerdataobject OnPlayerSpawn(BasePlayer player)Called when a player is attempting to spawn for the first time
337OnPlayerSpectatePlayernonnullobject OnPlayerSpectate(BasePlayer player, string spectateFilter)Called when the player starts spectating
338OnPlayerSpectateEndPlayernonnullobject OnPlayerSpectateEnd(BasePlayer player, string spectateFilter)Called when the player stops spectating
339OnPlayerTickPlayernonnullobject OnPlayerTick(BasePlayer player, PlayerTick msg, bool wasPlayerStalled)
340OnPlayerViolationPlayernonnullobject OnPlayerViolation(BasePlayer player, AntiHackType type, float amount)Called when the player triggers an anti-hack violation
341OnPlayerVoicePlayernonnullobject OnPlayerVoice(BasePlayer player, Byte[] data)Called when the player uses the in-game voice chat
342OnPlayerWoundPlayernonnullobject OnPlayerWound(BasePlayer player, HitInfo info)Called when the player is about to go down to the 'wounded' state; source might be null, check it before use
343OnPluginLoadedServer1nonevoid OnPluginLoaded(Plugin plugin)Called when any plugin has been loaded; Not to be confused with [`Loaded`](#loaded)
344OnPluginUnloadedServer1nonevoid OnPluginUnloaded(Plugin plugin)Called when any plugin has been unloaded; Not to be confused with [`Unload`](#unload)
345OnProjectileRicochetWeaponnonnullobject OnProjectileRicochet(BasePlayer player, PlayerProjectileRicochet ricochet)Called when a player's weapon projectile ricochets
346OnQuarryEnabledResourcenonevoid OnQuarryEnabled(MiningQuarry quarry)Called when a mining quarry is turned on/enabled
347OnQuarryGatherResourcenonevoid OnQuarryGather(MiningQuarry quarry, Item item)Called before items are gathered from a quarry
348OnQuarryToggledResourcenonevoid OnQuarryToggled(MiningQuarry quarry, BasePlayer player)Called when a quarry has just been toggled
349OnRconCommandServernonevoid OnRconCommand(IPAddress ip, string command, string[] args)Called when an RCON command is run
350OnRconConnectionServernonnullobject OnRconConnection(IPAddress ip)Called when a new RCON connection is opened
351OnReactiveTargetResetEntitynonevoid OnReactiveTargetReset(ReactiveTarget target)Called after the reactive target is reset
352OnRecyclerToggleEntitynonnullobject OnRecyclerToggle(Recycler recycler, BasePlayer player)Called when a recycler is turned on or off
353OnRefreshVendingStockVendingnonevoid OnRefreshVendingStock(VendingMachine machine, Item item)Called when the stock on a vending machine is updated
354OnRemoveDyingResourcenonnullobject OnRemoveDying(GrowableEntity plant, BasePlayer player)Called when a player is trying to harvest a dying growable entity
355OnResearchCostDetermineItemdataobject OnResearchCostDetermine(Item item, ResearchTable researchTable) ;; object OnResearchCostDetermine(ItemDefinition itemDefinition)Called when an item is being scrapped at a research table or when a blueprint is being unlocked in a tech tree
356OnResourceDepositCreatedEntitynonevoid OnResourceDepositCreated(ResourceDepositManager.ResourceDeposit deposit)Called when a resource deposit has been created
357OnRespawnInformationGivenPlayernonevoid OnRespawnInformationGiven(BasePlayer player, RespawnInformation respawnInformation)Called when a player is about to be sent respawn information
358OnRfBroadcasterAddEntitynonnullobject OnRfBroadcasterAdd(IRFObject obj, int frequency)Called right before an object starts broadcasting an RF frequency
359OnRfBroadcasterAddedEntitynonevoid OnRfBroadcasterAdded(IRFObject obj, int frequency)Called right after an object has started broadcasting an RF frequency
360OnRfBroadcasterRemoveEntitynonnullobject OnRfBroadcasterRemove(IRFObject obj, int frequency)Called right before an object stops broadasting an RF frequency
361OnRfBroadcasterRemovedEntitynonevoid OnRfBroadcasterRemoved(IRFObject obj, int frequency)Called right after an object has stopped broadcasting an RF frequency
362OnRfFrequencyChangeEntitynonnullobject OnRfFrequencyChange(IRFObject obj, int frequency, BasePlayer player)Called when a player tries to change the frequency of an RF broadcaster or receiver; Useful for preventing particular reserved frequencies from being selected
363OnRfFrequencyChangedEntitynonevoid OnRfFrequencyChanged(IRFObject obj, int frequency, BasePlayer player)Called after a player has changed the frequency of an RF broadcaster or receiver
364OnRfListenerAddEntitynonnullobject OnRfListenerAdd(IRFObject obj, int frequency)Called right before an object starts listening to an RF frequency
365OnRfListenerAddedEntitynonevoid OnRfListenerAdded(IRFObject obj, int frequency)Called right after an object has started listening to an RF frequency
366OnRfListenerRemoveEntitynonnullobject OnRfListenerRemove(IRFObject obj, int frequency)Called right before an object stops listening to an RF frequency
367OnRfListenerRemovedEntitynonevoid OnRfListenerRemoved(IRFObject obj, int frequency)Called right after an object has stopped listening to an RF frequency
368OnRidableAnimalClaimEntitynonnullobject OnRidableAnimalClaim(BaseRidableAnimal animal, BasePlayer player)Called when a player tries to claim a horse
369OnRidableAnimalClaimedEntitynonevoid OnRidableAnimalClaimed(BaseRidableAnimal animal, BasePlayer player)Called after a player has claimed a horse
370OnRocketLaunchedWeaponnonevoid OnRocketLaunched(BasePlayer player, BaseEntity entity)Called when the player launches a rocket
371OnRotateVendingMachineVendingnonnullobject OnRotateVendingMachine(VendingMachine machine, BasePlayer player)Called when a player attempts to rotate a vending machine
372OnRunPlayerMetabolismPlayernonnullobject OnRunPlayerMetabolism(PlayerMetabolism metabolism, BasePlayer player, float delta)Called before a metabolism update occurs for the specified player; Metabolism update consists of managing the player's temperature, health etc.; You can use this to turn off or change certain aspects of the metabolism, either by editing values before returning, or taking complete control of the method
373OnSamSiteTargetEntitynonnullobject OnSamSiteTarget(SamSite samSite, BaseCombatEntity target)Called before last target visible time is updated
374OnSaveLoadServernonnullobject OnSaveLoad(Dictionary<BaseEntity, ProtoBuf.Entity> entities)Called when a save file is loaded
375OnSendCommandPlayernonnullobject OnSendCommand(List<Connection> connections, string command, object[] args) ;; object OnSendCommand(Connection connection, string command, object[] args)Called before a command is sent from the server to a player (or a group of players); Usually commands aren't sent to a group of players, so in most cases it's safe to use only OnSendCommand with a single Connection.
376OnServerCommandServernonnullobject OnServerCommand(ConsoleSystem.Arg arg)Useful for intercepting commands before they get to their intended target
377OnServerInformationUpdatedServernonevoid OnServerInformationUpdated()Called after all steam information for the server has has been updated
378OnServerInitializedServer1nonevoid OnServerInitialized(bool initial)Called after the server startup has been completed and is awaiting connections; Also called for plugins that are hotloaded while the server is already started running; Boolean parameter, false if called on plugin hotload and true if called on server initialization
379OnServerMessageServerdataobject OnServerMessage(string message, string playerName, string color, ulong playerId) ;; void OnServerMessage(string message, string playerName, string color, ulong playerId)Called before a SERVER message is sent to a player
380OnServerRestartInterruptServernonnullobject OnServerRestartInterrupt()Called when a server restart is being cancelled
381OnServerSaveServer1nonevoid OnServerSave()Called before the server saves
382OnServerShutdownServernonevoid OnServerShutdown()Useful for saving something / etc on server shutdown
383OnShopAcceptClickEntitynonnullobject OnShopAcceptClick(ShopFront entity, BasePlayer player)Called when a player is trying to accept a trade in ShopFront
384OnShopCancelClickEntitynonnullobject OnShopCancelClick(ShopFront entity, BasePlayer player)Called when a player is cancelling a trade
385OnShopCompleteTradeEntitynonnullobject OnShopCompleteTrade(ShopFront entity)Called before the trade is completed in ShopFront
386OnShopCompleteTradeEntitynonnullobject OnShopCompleteTrade(ShopFront shop, BasePlayer customer)Called when a shopfront trade is complete
387OnSignLockedSignnonevoid OnSignLocked(Signage sign, BasePlayer player) ;; void OnSignLocked(PhotoFrame photoFrame, BasePlayer player)Called after the player has locked a sign or photo frame
388OnSignUpdatedSignnonevoid OnSignUpdated(Signage sign, BasePlayer player, int textureIndex) ;; void OnSignUpdated(PhotoFrame photoFrame, BasePlayer player) ;; void OnSignUpdated(CarvablePumpkin pumpkin, BasePlayer player)Called after the player has changed the text on a sign or updated a photo frame
389OnSleepingBagDestroyEntitynonnullobject OnSleepingBagDestroy(SleepingBag sleepingBag, BasePlayer player)Called when a player tries to remove a sleeping bag from their respawn screen
390OnSleepingBagDestroyedEntitynonevoid OnSleepingBagDestroyed(SleepingBag sleepingBag, BasePlayer player)Called after a player removes a sleeping bag from their respawn screen
391OnSleepingBagValidCheckEntityboolbool? OnSleepingBagValidCheck(SleepingBag bag, ulong targetPlayerID, bool ignoreTimers)Called when determining if a sleeping bag is a valid respawn location for a player; Useful in conjunction with OnRespawnInformationGiven since a custom sleeping bag will need to pass this check
392OnSolarPanelSunUpdateEntitynonnullobject OnSolarPanelSunUpdate(SolarPanel panel, int currentEnergy)Called when a solar panel updates the amount of energy it is getting from the sun
393OnSpinWheelSignnonevoid OnSpinWheel(BasePlayer player, SpinnerWheel wheel)Called when the player spins a spinner wheel
394OnStashExposedPlayernonevoid OnStashExposed(StashContainer stash, BasePlayer player)Called when a player reveals a hidden stash
395OnStashHiddenPlayernonevoid OnStashHidden(StashContainer stash, BasePlayer player)Called when a player hides a stash
396OnStructureDemolishStructurenonnullobject OnStructureDemolish(BaseCombatEntity entity, BasePlayer player, bool immediate)Called when the player selects Demolish or DemolishImmediate from the BuildingBlock or BaseCombatEntity menu
397OnStructureRepairStructurenonnullobject OnStructureRepair(BaseCombatEntity entity, BasePlayer player)Called when the player repairs a BuildingBlock or BaseCombatEntity
398OnStructureRotateStructurenonnullobject OnStructureRotate(BaseCombatEntity entity, BasePlayer player)Called when the player rotates a BuildingBlock or BaseCombatEntity
399OnStructureUpgradeStructurenonnullobject OnStructureUpgrade(BaseCombatEntity entity, BasePlayer player, BuildingGrade.Enum grade)Called when the player upgrades the grade of a BuildingBlock or BaseCombatEntity
400OnSupplyDropDroppedEntitynonevoid OnSupplyDropDropped(SupplyDrop supplyDrop, CargoPlane cargoPlane)Called right after a cargo plane has dropped a supply drop
401OnSupplyDropLandedEntitynonevoid OnSupplyDropLanded(SupplyDrop entity)Called after Supply Drop has landed
402OnSurveyGatherResourcenonevoid OnSurveyGather(SurveyCharge survey, Item item)Called before items are gathered from a survey charge
403OnSwitchToggleEntitynonnullobject OnSwitchToggle(IOEntity entity, BasePlayer player)Called when a player tries to switch and ElectricSwitch or FuelGenerator
404OnSwitchToggledEntitynonevoid OnSwitchToggled(IOEntity entity, BasePlayer player)Called right after a player switches an ElectricSwitch or FuelGenerator
405OnTakeCurrencyItemVendingnonnullobject OnTakeCurrencyItem(VendingMachine vending, Item item)Called before currency item is taken
406OnTeamAcceptInviteTeamnonnullobject OnTeamAcceptInvite(RelationshipManager.PlayerTeam team, BasePlayer player)Useful for canceling team invitation acceptation
407OnTeamCreateTeamnonnullobject OnTeamCreate(BasePlayer player)Useful for canceling team creation
408OnTeamCreatedTeamnonevoid OnTeamCreated(BasePlayer player, RelationshipManager.PlayerTeam team)Called after a team was created
409OnTeamDisbandTeamnonnullobject OnTeamDisband(RelationshipManager.PlayerTeam team)Useful for canceling team disbandment
410OnTeamDisbandedTeamnonevoid OnTeamDisbanded(RelationshipManager.PlayerTeam team)Called when the team was disbanded
411OnTeamInviteTeamnonnullobject OnTeamInvite(BasePlayer inviter, BasePlayer target)Useful for canceling an invitation
412OnTeamKickTeamnonnullobject OnTeamKick(RelationshipManager.PlayerTeam team, BasePlayer player, ulong target)Useful for canceling kick of the player from the team
413OnTeamLeaveTeamnonnullobject OnTeamLeave(RelationshipManager.PlayerTeam team, BasePlayer player)Useful for canceling the leave from the team
414OnTeamPromoteTeamnonnullobject OnTeamPromote(RelationshipManager.PlayerTeam team, BasePlayer newLeader)Useful for canceling player's promotion in the team
415OnTeamRejectInviteTeamnonnullobject OnTeamRejectInvite(BasePlayer rejector, RelationshipManager.PlayerTeam team)Useful for canceling the invitation rejection
416OnTeamUpdateTeamnonnullobject OnTeamUpdate(ulong currentTeam, ulong newTeam, BasePlayer player)Called when player's team is updated
417OnTeamUpdatedTeamnonnullobject OnTeamUpdated(ulong currentTeam, PlayerTeam playerTeam, BasePlayer player)Called before sending team info to player
418OnTechTreeNodeUnlockTechTreenonnullobject OnTechTreeNodeUnlock(Workbench workbench, TechTreeData.NodeInstance node, BasePlayer player)Called when a player is attempting to unlock a blueprint in a tech tree, after the `CanUnlockTechTreeNode` and `CanUnlockTechTreeNodePath` hooks, before the player is charged scrap; Useful for replacing the default behavior to charge the player a different currency, or to unlock multiple blueprints at once (such as those leading up to the one selected)
419OnTechTreeNodeUnlockedTechTreenonevoid OnTechTreeNodeUnlocked(Workbench workbench, TechTreeData.NodeInstance node, BasePlayer player)Called after a player has unlocked a blueprint in a tech tree; Useful for automatically unlocking blueprints for team members
420OnTerrainInitializedTerrainnonevoid OnTerrainInitialized()Called after the terrain generation process has completed
421OnThreatLevelUpdatePlayernonnullobject OnThreatLevelUpdate(BasePlayer player)Called when a player's threat level is about to be updated
422OnTickServernonevoid OnTick()Called every tick (defined by the tick rate of the server); For better performance, avoid using heavy calculations in this hook.
423OnToggleVendingBroadcastVendingnonevoid OnToggleVendingBroadcast(VendingMachine machine, BasePlayer player)Called when a player toggles the broadcasting of the vending machine
424OnTrapArmItemnonnullobject OnTrapArm(BearTrap trap, BasePlayer player)Called when the player arms a bear trap
425OnTrapDisarmItemnonnullobject OnTrapDisarm(Landmine trap, BasePlayer player)Called when the player disarms a land mine
426OnTrapSnappedItemnonevoid OnTrapSnapped(BaseTrapTrigger trap, GameObject go)Called when a trap is triggered by a game object
427OnTrapTriggerItemnonnullobject OnTrapTrigger(BaseTrap trap, GameObject go)Called when a trap is triggered by a game object
428OnTreeMarkerHitResourceboolbool? OnTreeMarkerHit(TreeEntity tree, HitInfo info)Called when a player hits a tree with a tool (rock, hatchet, etc.)
429OnTurretAssignEntitynonnullobject OnTurretAssign(AutoTurret turret, ulong targetId, BasePlayer initiator)Called when a player attempts to authorize another player on a turret
430OnTurretAssignedEntitynonevoid OnTurretAssigned(AutoTurret turret, ulong targetId, BasePlayer initiator)Called when a player has been authorized on a turret by another player
431OnTurretAuthorizeEntitynonnullobject OnTurretAuthorize(AutoTurret turret, BasePlayer player)Called when a player attempts to authorize on a turret
432OnTurretClearListEntitynonnullobject OnTurretClearList(AutoTurret turret, BasePlayer player)Called when a player attempts to clear an autoturret's authorized list
433OnTurretDeauthorizeEntitynonnullobject OnTurretDeauthorize(AutoTurret turret, BasePlayer player)Called when a player is deauthorized on an autoturret
434OnTurretModeToggleEntitynonevoid OnTurretModeToggle(AutoTurret turret)Called when the mode of an autoturrent is toggled
435OnTurretRotateEntitynonnullobject OnTurretRotate(AutoTurret turret, BasePlayer player)Called when a player tries to rotate an auto turret
436OnTurretShutdownEntitynonnullobject OnTurretShutdown(AutoTurret turret)Called when an autoturret is shut down
437OnTurretStartupEntitynonnullobject OnTurretStartup(AutoTurret turret)Called when an autoturret starts up
438OnTurretTargetEntitynonnullobject OnTurretTarget(AutoTurret turret, BaseCombatEntity entity)Called when an autoturret attempts to target an entity
439OnTurretToggleEntitynonnullobject OnTurretToggle(AutoTurret turret)Called when an autoturret toggles powerstate (on/off)
440OnUserApprovePlayernonnullobject OnUserApprove(Network.Connection connection)Used by RustCore and abstracted into CanClientLogin
441OnUserApprovedPlayer1nonevoid OnUserApproved(string name, string id, string ipAddress)Called after a player is approved to connect to the server
442OnUserBannedPlayer1nonevoid OnUserBanned(string name, string id, string ipAddress, string reason)Called when a player has been banned from the server; Will have reason available if provided
443OnUserChatPlayer1dataobject OnUserChat(IPlayer player, string message)Called when a player sends a chat message to the server
444OnUserCommandPlayer1nonnullobject OnUserCommand(IPlayer player, string command, string[] args)Useful for intercepting players' commands before their handling
445OnUserConnectedPlayer1nonevoid OnUserConnected(IPlayer player)Called after a player has been approved and has connected to the server
446OnUserDisconnectedPlayer1nonevoid OnUserDisconnected(IPlayer player)Called after a player has disconnected from the server
447OnUserGroupAddedPlayer1nonevoid OnUserGroupAdded(string id, string groupName)Called when a player has been added to a group
448OnUserGroupRemovedPlayer1nonevoid OnUserGroupRemoved(string id, string groupName)Called when a player has been removed from a group
449OnUserKickedPlayer1nonevoid OnUserKicked(IPlayer player, string reason)Called when a player has been kicked from the server
450OnUserNameUpdatedPlayer1nonevoid OnUserNameUpdated(string id, string oldName, string newName)Called when a player's stored nickname has been changed
451OnUserPermissionGrantedPlayer1nonevoid OnUserPermissionGranted(string id, string permName)Called when a permission has been granted to a player
452OnUserPermissionRevokedPlayer1nonevoid OnUserPermissionRevoked(string id, string permName)Called when a permission has been revoked from a player
453OnUserRespawnPlayer1nonevoid OnUserRespawn(IPlayer player)Called when a player is respawning
454OnUserRespawnedPlayer1nonevoid OnUserRespawned(IPlayer player)Called after a player has respawned
455OnUserUnbannedPlayer1nonevoid OnUserUnbanned(string name, string id, string ipAddress)Called when a player has been unbanned from the server
456OnVehicleModuleDeselectedVehiclenonevoid OnVehicleModuleDeselected(ModularCarGarage carLift, BasePlayer player)Called right after a player deselects a vehicle module item in a car's inventory
457OnVehicleModuleMoveVehiclenonnullobject OnVehicleModuleMove(BaseVehicleModule module, BaseModularVehicle vehicle, BasePlayer player)Called when a player tries to move a vehicle module item that is currently on a vehicle
458OnVehicleModulesAssignVehiclenonnullobject OnVehicleModulesAssign(ModularCar car, ItemModVehicleModule[] modulePreset)Called right after a modular car has spawned, but before module items are added to its inventory from a preset
459OnVehicleModulesAssignedVehiclenonevoid OnVehicleModulesAssigned(ModularCar car, ItemModVehicleModule[] modulePreset)Called right after a car has spawned and its module inventory has been filled with module items from a preset
460OnVehicleModuleSelectVehiclenonnullobject OnVehicleModuleSelect(Item moduleItem, ModularCarGarage carLift, BasePlayer player)Called right after a player has selected a vehicle module item in a car inventory, but before they are shown the corresponding storage container
461OnVehicleModuleSelectedVehiclenonevoid OnVehicleModuleSelected(Item moduleItem, ModularCarGarage carLift, BasePlayer player)Called right after a player has selected a vehicle module item in a car's inventory, and after they have been shown the corresponding storage container if applicable
462OnVehiclePushVehiclenonnullobject OnVehiclePush(BaseVehicle vehicle, BasePlayer player)Called when a player tries to push a vehicle
463OnVendingShopOpenedVendingnonevoid OnVendingShopOpened(VendingMachine machine, BasePlayer player)Called when a player opens the customer ui for a vending machine
464OnVendingShopRenameVendingnonnullobject OnVendingShopRename(VendingMachine vending, string newName, BasePlayer player)Called when a player tries to rename vending shop
465OnVendingTransactionVendingboolbool OnVendingTransaction(VendingMachine machine, BasePlayer buyer, int sellOrderId, int numberOfTransactions)Called when a player attempts to buy an item from a vending machine
466OnWaterCollectEntitynonnullobject OnWaterCollect(WaterCatcher waterCatcher)Called when a water catcher is about to collect water
467OnWaterPurifiedEntitynonevoid OnWaterPurified(WaterPurifier waterPurifier, float timeCooked)Called after salt water has been converted to fresh water in a water purifier
468OnWaterPurifyEntitynonnullobject OnWaterPurify(WaterPurifier waterPurifier, float timeCooked)Called when salt water is about to be converted to fresh water in a water purifier
469OnWeaponFiredWeaponnonevoid OnWeaponFired(BaseProjectile projectile, BasePlayer player, ItemModProjectile mod, ProtoBuf.ProjectileShoot projectiles)Called when the player fires a weapon
470OnWeaponReloadWeaponnonnullobject OnWeaponReload(BaseProjectile weapon, BasePlayer player)Called when the player reloads a weapon
471OnWireClearEntitynonnullobject OnWireClear(BasePlayer player, IOEntity entity1, int connected, IOEntity entity2, bool flag)Useful for preventing clearing wires
472OnWireConnectEntitynonnullobject OnWireConnect(BasePlayer player, IOEntity entity1, int inputs, IOEntity entity2, int outputs)Useful for preventing a wire to connect
473OnWorldPrefabSpawnedWorldnonevoid OnWorldPrefabSpawned(GameObject gameObject, string category)Called when a world prefab was spawned
474OnWorldProjectileCreateWeaponnonnullobject OnWorldProjectileCreate(HitInfo hitInfo, Item item)Called when a projectile is created
475UnloadPlugin1nonevoid Unload()Called when a plugin is being unloaded