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
This commit is contained in:
2026-09-15 10:01:11 -05:00
parent 8d31e497d2
commit 4e2c2dc439
10 changed files with 4616 additions and 577 deletions

View File

@@ -0,0 +1,478 @@
name category universal returns signatures description
CanAcceptItem Item data ItemContainer.CanAcceptResult? CanAcceptItem(ItemContainer container, Item item, int targetPos) Called when attempting to put an item in a container
CanAdministerVending Vending bool bool CanAdministerVending(BasePlayer player, VendingMachine machine) Called when a player attempts to administer a vending machine
CanAffordToPlace Player bool bool CanAffordToPlace(BasePlayer player, Planner planner, Construction construction) Useful for ignoring resource requirements for placement
CanAffordUpgrade Player bool bool CanAffordUpgrade(BasePlayer player, BuildingBlock block, BuildingGrade.Enum grade) Called when the resources for an upgrade are checked
CanAssignBed Player nonnull object CanAssignBed(BasePlayer player, SleepingBag bag, ulong targetPlayerId) Called when a player attempts to assign a bed or sleeping bag to another player
CanBeTargeted Player bool bool CanBeTargeted(BaseCombatEntity player, MonoBehaviour behaviour) Called when an autoturret, flame turret, shotgun trap, or helicopter turret is attempting to target the player
CanBeWounded Player bool bool CanBeWounded(BasePlayer player, HitInfo info) Called when any damage is attempted on player
CanBradleyApcTarget Entity bool bool CanBradleyApcTarget(BradleyAPC apc, BaseEntity entity) Called when an APC targets an entity
CanBuild Player nonnull object CanBuild(Planner planner, Construction prefab, Construction.Target target) Called when the player tries to build something
CanBypassQueue Player data bool CanBypassQueue(Network.Connection connection) Called before the player is added to the connection queue
CanCatchFish Fishing bool bool? CanCatchFish(BasePlayer player, BaseFishingRod rod, Item item) Called before a fish is caught
CanChangeCode Player nonnull object CanChangeCode(BasePlayer player, CodeLock codeLock, string newCode, bool isGuestCode) Called when a player tries to change the code on a codelock
CanChangeGrade Player bool bool CanChangeGrade(BasePlayer player, BuildingBlock block, BuildingGrade.Enum grade) Called when a player tries to change a building grade
CanCheckFuel Vehicle bool object CanCheckFuel(EntityFuelSystem fuelSystem, StorageContainer fuelContainer, BasePlayer player) Called when a player tries to loot a vehicle's fuel container
CanClientLogin Player data object CanClientLogin(Network.Connection connection) Called when the player is attempting to login
CanCombineDroppedItem Item nonnull object CanCombineDroppedItem(DroppedItem item, DroppedItem targetItem) Called when an item is dropped on another item
CanCraft Player bool bool CanCraft(ItemCrafter itemCrafter, ItemBlueprint bp, int amount) ;; bool CanCraft(PlayerBlueprints playerBlueprints, ItemDefinition itemDefinition, int skinItemId) Called when the player attempts to craft an item
CanCreateWorldProjectile Weapon nonnull object CanCreateWorldProjectile(HitInfo info, ItemDefinition itemDef) Called when the item creates a projectile in the world
CanDemolish Player bool bool CanDemolish(BasePlayer player, BuildingBlock block, BuildingGrade.Enum grade) Called when a player tries to demolish a building block
CanDeployItem Player nonnull object CanDeployItem(BasePlayer player, Deployer deployer, NetworkableId entityId) Useful for denying items' deployment
CanDismountEntity Player nonnull object CanDismountEntity(BasePlayer player, BaseMountable entity) Called when the player attempts to dismount an entity
CanDropActiveItem Item bool bool CanDropActiveItem(BasePlayer player) Called when a player attempts to drop their active item
CanEntityBeHostile Entity nonnull object CanEntityBeHostile(BaseCombatEntity entity) Useful for overriding hostility of an entity
CanEquipItem Player bool bool CanEquipItem(PlayerInventory inventory, Item item, int targetPos) Called when the player attempts to equip an item
CanExplosiveStick Weapon nonnull object CanExplosiveStick(TimedExplosive explosive, BaseEntity entity) Called when a Timed Explosive is attempting to stick to another entity
CanHackCrate Player nonnull object CanHackCrate(BasePlayer player, HackableLockedCrate crate) Called when a player starts hacking a locked crate
CanHelicopterDropCrate Entity bool bool CanHelicopterDropCrate(CH47HelicopterAIController heli) Called when a CH47 helicopter attempts to drop a crate
CanHelicopterStrafe Entity bool bool CanHelicopterStrafe(PatrolHelicopterAI heli) Called when a patrol helicopter attempts to strafe
CanHelicopterStrafeTarget Entity bool bool CanHelicopterStrafeTarget(PatrolHelicopterAI entity, BasePlayer target) Called when a patrol helicopter attempts to target a player to attack while strafing
CanHelicopterTarget Entity bool bool CanHelicopterTarget(PatrolHelicopterAI heli, BasePlayer player) Called when a patrol helicopter attempts to target a player to attack
CanHelicopterUseNapalm Entity bool bool CanHelicopterUseNapalm(PatrolHelicopterAI heli) Called when a patrol helicopter attempts to use napalm
CanHideStash Player nonnull object CanHideStash(BasePlayer player, StashContainer stash) Called when a player tries to hide a stash
CanLock Player nonnull object CanLock(BasePlayer player, BaseLock baseLock) Useful for canceling the lock action
CanLockerAcceptItem Entity bool object CanLockerAcceptItem(Locker locker, Item item, int targetPos) Called before an item is attempted to be placed inside a locker
CanLootEntity Player nonnull object 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
CanLootPlayer Player bool bool CanLootPlayer(BasePlayer target, BasePlayer looter) Called when the player attempts to loot another player
CanMountEntity Player nonnull object CanMountEntity(BasePlayer player, BaseMountable entity) Called when the player attempts to mount an entity
CanMoveItem Item nonnull object CanMoveItem(Item item, PlayerInventory playerLoot, ItemContainerId targetContainer, int targetSlot, int amount, ItemMoveModifier itemMoveModifier) Called when moving an item from one inventory slot to another
CanNetworkTo Entity bool bool 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.
CanNpcAttack Entity bool bool CanNpcAttack(BaseNpc npc, BaseEntity target) Called when a NPC attempts to attack another entity
CanNpcEat Entity bool bool CanNpcEat(BaseNpc npc, BaseEntity target) Called when a NPC attempts to eat another entity
CanPickupEntity Player bool bool 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.)
CanPickupLock Player bool bool CanPickupLock(BasePlayer player, BaseLock baseLock) Called when a player attempts to pickup a lock
CanPushBoat Player nonnull object CanPushBoat(BasePlayer player, MotorRowboat boat) Useful for canceling boat push
CanReceiveCall Phone bool object CanReceiveCall(PhoneController receiverPhone) Called when a player tries to place a phone call
CanRecycle Entity bool bool CanRecycle(Recycler recycler, Item item) Called when the recycler attempts to recycle an item
CanRenameBed Player nonnull object CanRenameBed(BasePlayer player, SleepingBag bed, string bedName) Called when the player attempts to rename a bed or sleeping bag
CanResearchItem Player nonnull object CanResearchItem(BasePlayer player, Item targetItem) Called when the player attempts to research an item
CanSamSiteShoot Entity nonnull object CanSamSiteShoot(SamSite samSite) Useful for canceling the shoot of SamSite
CanSeeStash Player nonnull object CanSeeStash(BasePlayer player, StashContainer stash) Called when a player is looking at a hidden stash
CanSetBedPublic Player nonnull object CanSetBedPublic(BasePlayer player, SleepingBag bed) Called when a player tries to set a bed public
CanSetRelationship Player bool bool? CanSetRelationship(BasePlayer player, BasePlayer otherPlayer, RelationshipManager.RelationshipType relationshipType, int weight) Called when a player's relationship with another is about to be updated
CanSpectateTarget Player nonnull object CanSpectateTarget(BasePlayer player, string filter) Called when spectate target is attempting to update
CanStackItem Item bool bool CanStackItem(Item item, Item targetItem) Called when moving an item onto another item
CanSwapToSeat Entity bool bool CanSwapToSeat(BasePlayer player, BaseMountable mountable) Called when a player tries to switch seats, to determine whether each seat is eligible to be swapped to
CanTakeCutting Resource nonnull object CanTakeCutting(BasePlayer player, GrowableEntity entity) Called when a player is trying to take a cutting (clone) of a GrowableEntity
CanUnlock Player nonnull object CanUnlock(BasePlayer player, BaseLock baseLock) Called when the player tries to unlock a keylock or codelock
CanUnlockTechTreeNode TechTree bool object 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
CanUnlockTechTreeNodePath TechTree bool object 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
CanUpdateSign Player bool bool 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
CanUseFuel Vehicle bool object CanUseFuel(EntityFuelSystem fuelSystem, StorageContainer fuelContainer, float currentSeconds, float fuelPerSecond) Called before a vehicle fuel system consumes fuel
CanUseGesture Player bool bool? CanUseGesture(BasePlayer player, GestureConfig gesture) Called when a player attempts to use a gesture
CanUseHelicopter Vehicle nonnull object CanUseHelicopter(BasePlayer player, CH47HelicopterAIController helicopter) Useful for denying to mount a CH47 helicopter
CanUseLockedEntity Player bool bool CanUseLockedEntity(BasePlayer player, BaseLock baseLock) Called when the player tries to use an entity that is locked
CanUseMailbox Player bool bool CanUseMailbox(BasePlayer player, Mailbox mailbox) Called when the player tries to use a mailbox
CanUserLogin Player 1 data object CanUserLogin(string name, string id, string ipAddress) Called when a player is attempting to connect to the server
CanUseUI Player nonnull object CanUseUI(BasePlayer player, string json) Called when the player attempts to use a custom UI
CanUseVending Vending bool bool CanUseVending(BasePlayer player, VendingMachine machine) Called when a player attempts to use a vending machine
CanUseWires Player nonnull object CanUseWires(BasePlayer player) Useful for allowing or preventing a player from using wires
CanVendingAcceptItem Vending bool bool CanVendingAcceptItem(VendingMachine vending, Item item, int targetPos) Called when a player attempts to administer a vending machine
CanWearItem Player nonnull object CanWearItem(PlayerInventory inventory, Item item, int targetSlot) Called when the player attempts to equip an item
Init Server 1 none void Init() Called when a plugin is being initialized; Other plugins may or may not be present, dependant on load order
LoadDefaultConfig Plugin 1 none protected override void LoadDefaultConfig() Called when the config for a plugin should be initialized; Only called if the config file does not already exist
LoadDefaultMessages Plugin 1 none protected override void LoadDefaultMessages() Called when the localization for a plugin should be registered
Loaded Plugin 1 none void Loaded() Called when a plugin has finished loading; Other plugins may or may not be present, dependant on load order
OnActiveItemChange Player nonnull object OnActiveItemChange(BasePlayer player, Item oldItem, ItemId newItemId) Called when active item is attempting to update
OnActiveItemChanged Player none void OnActiveItemChanged(BasePlayer player, Item oldItem, Item newItem) Called when active item was changed
OnAddVendingOffer Vending none void OnAddVendingOffer(VendingMachine machine, ProtoBuf.VendingMachine.SellOrder sellOrder) Called when a sell order/offer is added to a vending machine
OnAirdrop Entity none void OnAirdrop(CargoPlane plane, Vector3 dropPosition) Called when an airdrop has been called
OnAmmoSwitch Weapon nonnull object OnAmmoSwitch(BaseProjectile weapon, BasePlayer player) Called when the player starts to switch the ammo in a weapon
OnAmmoUnload Weapon nonnull object OnAmmoUnload(BaseProjectile projectile, Item item, BasePlayer player) Called when a player is trying to unload ammo
OnAnalysisComplete Player none void OnAnalysisComplete(SurveyCrater surveyCrater, BasePlayer player) Called right after a player completes a survey crater analysis
OnBackpackDrop Item data object OnBackpackDrop(Item backpack, BasePlayer player) Called just before a backpack is dropped from a player on death.
OnBigWheelLoss Entity none void OnBigWheelLoss(BigWheelGame wheel, Item item) Called when a specific item is lost on the big wheel game
OnBigWheelWin Entity data object OnBigWheelWin(BigWheelGame bigWheel, Item scrap, BigWheelBettingTerminal terminal, int multiplier) Called before multiplier is applied.
OnBoatPathGenerate Vehicle data List<Vector3> OnBoatPathGenerate() Called when generating ocean patrol path for CargoShip
OnBonusItemDrop Item nonnull object 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
OnBonusItemDropped Item none void OnBonusItemDropped(Item item, BasePlayer player) Called after a loot container has dropped bonus scrap for a player who has a corresponding tea buff
OnBookmarkAdd Entity nonnull object OnBookmarkAdd(ComputerStation computerStation, BasePlayer player, string bookmarkName) Called when a player tries to add a bookmark at a computer station
OnBookmarkControl Entity nonnull object OnBookmarkControl(ComputerStation computerStation, BasePlayer player, string bookmarkName, IRemoteControllable remoteControllable) Called when a player tries to select a bookmark at a computer station
OnBookmarkControlEnd Entity nonnull object OnBookmarkControlEnd(ComputerStation computerStation, BasePlayer player, BaseEntity controlledEntity) Called when a player tries to stop viewing/controlling an entity at a computer station
OnBookmarkControlEnded Entity none void OnBookmarkControlEnded(ComputerStation computerStation, BasePlayer player, BaseEntity controlledEntity) Called after a player has stopped viewing/controlling an entity at a computer station
OnBookmarkControlStarted Entity none void OnBookmarkControlStarted(ComputerStation computerStation, BasePlayer player, string bookmarkName, IRemoteControllable remoteControllable) Called after a player has selected a bookmark at a computer station
OnBookmarkDelete Entity nonnull object OnBookmarkDelete(ComputerStation computerStation, BasePlayer player, string bookmarkName) Called when a player tries to delete a bookmark at a computer station
OnBookmarkInput Entity nonnull object 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
OnBookmarksSendControl Entity nonnull object OnBookmarksSendControl(ComputerStation computerStation, BasePlayer player, string bookmarks) Called when a player is being sent a list of bookmarks for a computer station
OnBradleyApcHunt Entity nonnull object OnBradleyApcHunt(BradleyAPC apc) Called when an APC starts hunting
OnBradleyApcInitialize Entity nonnull object OnBradleyApcInitialize(BradleyAPC apc) Called when an APC initializes
OnBradleyApcPatrol Entity nonnull object OnBradleyApcPatrol(BradleyAPC apc) Called when an APC is starts patrolling
OnBroadcastCommand Player nonnull object OnBroadcastCommand(string command, object[] args) Called before a command is broadcasted to all connected clients
OnBuildingPrivilege Entity data BuildingPrivlidge OnBuildingPrivilege(BaseEntity entity, OBB obb) Useful for overriding a building privilege on specific entities and etc.
OnBuildingSplit Structure none void OnBuildingSplit(BuildingManager.Building building, uint newBuildingId) Called when a building is split into two
OnButtonPress Entity nonnull object OnButtonPress(PressButton button, BasePlayer player) Called when a player is trying to press a button
OnBuyVendingItem Vending nonnull object OnBuyVendingItem(VendingMachine machine, BasePlayer player, int sellOrderId, int numberOfTransactions) Called when a player buys an item from a vending machine
OnCardSwipe Item nonnull object OnCardSwipe(CardReader cardReader, Keycard card, BasePlayer player) Called when a player is trying to swipe a card
OnCargoPlaneSignaled Entity none void OnCargoPlaneSignaled(CargoPlane cargoPlane, SupplySignal supplySignal) Called right after a supply signal has called a cargo plane
OnCCTVDirectionChange Entity nonnull object OnCCTVDirectionChange(CCTV_RC camera, BasePlayer player) Called when a player attempts to change the direction of a CCTV camera to face them
OnCentralizedBanCheck Player nonnull object OnCentralizedBanCheck(Network.Connection connection) Called when a player is about to be checked in the centralized ban database
OnClanColorChanged Clan none void OnClanColorChanged(LocalClan clan, Color32 color, ulong steamId) Called after a player changes a clan color
OnClanCreated Clan none void OnClanCreated(LocalClan clan, ulong steamId) Called after a player has created a clan
OnClanDisbanded Clan none void OnClanDisbanded(LocalClan clan, ulong steamId) Called after a player disbands a clan
OnClanLogoChanged Clan none void OnClanLogoChanged(LocalClan clan, byte[] logo, ulong steamId) Called after a player changes a clan logo
OnClanMemberAdded Clan none void OnClanMemberAdded(long clanId, ulong steamId) Called after a player has accepted a clan invite
OnClanMemberKicked Clan none void OnClanMemberKicked(LocalClan clan, ulong steamId, ulong bySteamId) Called after a player has kicked another player from a clan
OnClanMemberLeft Clan none void OnClanMemberLeft(LocalClan clan, ulong steamId) Called after a player has voluntarily left a clan
OnClientAuth Player none void OnClientAuth(Connection connection) Called when the player is giving server connection authorization information
OnClientCommand Player nonnull object OnClientCommand(Connection connection, string command) Useful for intercepting players' commands before their handling; Called before OnPlayerCommand and OnUserCommand
OnCodeEntered Structure nonnull object OnCodeEntered(CodeLock codeLock, BasePlayer player, string code) Called when the player has entered a code in a codelock
OnCollectiblePickup Resource nonnull object OnCollectiblePickup(CollectibleEntity collectible, BasePlayer player) Called when the player collects an item
OnConstructionPlace Structure nonnull object OnConstructionPlace(BaseEntity entity, Construction component, Construction.Target constructionTarget, BasePlayer player) Called when a player tries to place a building block
OnContainerDropItems Entity nonnull object OnContainerDropItems(ItemContainer container) Called when a container is destroyed and all items are about to be dropped
OnCorpsePopulate Player data BaseCorpse OnCorpsePopulate(BasePlayer npcPlayer, BaseCorpse corpse) Called when an NPC player corpse is about to be populated with loot
OnCounterModeToggle Entity nonnull object OnCounterModeToggle(PowerCounter counter, BasePlayer player, bool mode) Called when a player ties to toggle a power counter between modes
OnCounterTargetChange Entity nonnull object OnCounterTargetChange(PowerCounter counter, BasePlayer player, int targetNumber) Called when a player tries to change the target number of a power counter
OnCrateDropped Entity none void OnCrateDropped(HackableLockedCrate crate) Called when a locked crate from the CH47 (Chinook) has dropped
OnCrateHack Entity none void OnCrateHack(HackableLockedCrate crate) Called when a player starts hacking a locked crate
OnCrateHackEnd Entity none void OnCrateHackEnd(HackableLockedCrate crate) Called when a player stops hacking a locked crate
OnCrateLanded Entity none void OnCrateLanded(HackableLockedCrate crate) Called when a locked crate from the CH47 (Chinook) has landed
OnCupboardAuthorize Structure nonnull object OnCupboardAuthorize(BuildingPrivlidge privilege, BasePlayer player) Called when a cupboard attempts to authorize a player
OnCupboardClearList Structure nonnull object OnCupboardClearList(BuildingPrivlidge privilege, BasePlayer player) Called when an attempt is made to clear a cupboard authorized list
OnCupboardDeauthorize Structure nonnull object OnCupboardDeauthorize(BuildingPrivlidge privilege, BasePlayer player) Called when a cupboard attempts to deauthorize a player
OnDefaultItemsReceive Player nonnull object OnDefaultItemsReceive(PlayerInventory inventory) Called when a player is about to receive default items
OnDefaultItemsReceived Player nonnull void OnDefaultItemsReceived(PlayerInventory inventory) Called after a player has received default items
OnDeleteVendingOffer Vending none void OnDeleteVendingOffer(VendingMachine machine, int offerId) Called when a sell order/offer is deleted from a vending machine
OnDemoRecordingStart Player nonnull object OnDemoRecordingStart(string filename, BasePlayer player) Called right before a demo of a player starts recording
OnDemoRecordingStarted Player none void OnDemoRecordingStarted(string filename, BasePlayer player) Called after a demo of a player has started recording
OnDemoRecordingStop Player nonnull object OnDemoRecordingStop(string filename, BasePlayer player) Called right before a demo of a player stops recording
OnDemoRecordingStopped Player none void OnDemoRecordingStopped(string filename, BasePlayer player) Called after a demo of a player has stopped recording
OnDestroyUI Player none void OnDestroyUI(BasePlayer player, string json) Called when a custom UI is destroyed for the player
OnDieselEngineToggle Entity nonnull object OnDieselEngineToggle(DieselEngine engine, BasePlayer player) Called when a player is trying to toggle diesel engine
OnDieselEngineToggled Entity none void OnDieselEngineToggled(DieselEngine engine) Called when diesel engine is toggled
OnDispenserBonus Resource data void OnDispenserBonus(ResourceDispenser dispenser, BasePlayer player, Item item) Called before the player is given a bonus item for gathering
OnDispenserGather Resource nonnull object OnDispenserGather(ResourceDispenser dispenser, BasePlayer player, Item item) Called before the player is given items from a resource
OnDoorClosed Structure none void OnDoorClosed(Door door, BasePlayer player) Called when the player closed a door
OnDoorKnocked Structure none void OnDoorKnocked(Door door, BasePlayer player) Called when the player knocks on a door
OnDoorOpened Structure none void OnDoorOpened(Door door, BasePlayer player) Called when the player opened a door
OnElevatorButtonPress Entity nonnull object OnElevatorButtonPress(ElevatorLift lift, BasePlayer player, Elevator.Direction direction, bool toTopOrBottom) Called when a player presses a button on an elevator lift
OnElevatorCall Entity nonnull object OnElevatorCall(Elevator elevator, Elevator topElevator) Called when an elevator lift is called to a specific floor by electricity
OnElevatorMove Entity nonnull object OnElevatorMove(Elevator topElevator, int targetFloor) Called right before an elevator starts moving to the target floor
OnEngineLoadoutRefresh Entity nonnull object OnEngineLoadoutRefresh(EngineStorage storage) Called before engine loadout data is refreshed
OnEngineStart Vehicle nonnull object OnEngineStart(BaseVehicle vehicle, BasePlayer driver) Called when a player tries to start a vehicle engine
OnEngineStarted Vehicle none void OnEngineStarted(BaseVehicle vehicle, BasePlayer driver) Called right after a vehicle engine has started
OnEngineStatsRefresh Vehicle nonnull object OnEngineStatsRefresh(VehicleModuleEngine engineModule, EngineStorage engineStorage) Called right before the stats of a modular car engine are refreshed
OnEngineStatsRefreshed Vehicle none void OnEngineStatsRefreshed(VehicleModuleEngine engineModule, EngineStorage engineStorage) Called right after the stats of a modular car engine are refreshed
OnEngineStop Vehicle nonnull object OnEngineStop(BaseVehicle vehicle) Called when a vehicle engine is about to stop
OnEngineStopped Vehicle none void OnEngineStopped(BaseVehicle vehicle) Called right after a vehicle engine has stopped
OnEntityBuilt Structure none void OnEntityBuilt(Planner plan, GameObject go) Called when any structure is built (walls, ceilings, stairs, etc.)
OnEntityControl Entity bool object OnEntityControl(IRemoteControllable entity) Called when a player tries to remote control an entity
OnEntityDeath Entity none void OnEntityDeath(BaseCombatEntity entity, HitInfo info) HitInfo might be null, check it before use; Editing hitInfo has no effect because the death has already happened
OnEntityDestroy Entity nonnull object OnEntityDestroy(BaseCombatEntity entity) Called right before a CH47Helicopter or BradleyAPC is destroyed
OnEntityDismounted Entity none void OnEntityDismounted(BaseMountable entity, BasePlayer player) Called when an entity is dismounted by a player
OnEntityEnter Entity none void OnEntityEnter(TriggerBase trigger, BaseEntity entity) Called when an entity enters a trigger (water area, radiation zone, hurt zone, etc.)
OnEntityFlagsNetworkUpdate Entity nonnull object OnEntityFlagsNetworkUpdate(BaseEntity entity) Called after an entity's flags have been updated on the server, before they are sent over the network
OnEntityGroundMissing Entity nonnull object OnEntityGroundMissing(BaseEntity entity) Called when an entity (sleepingbag, sign, furnace,...) is going to be destroyed because the buildingblock it is on was removed
OnEntityKill Entity nonnull object OnEntityKill(BaseNetworkable entity) Called when an entity is destroyed
OnEntityLeave Entity none void OnEntityLeave(TriggerBase trigger, BaseEntity entity) Called when an entity leaves a trigger (water area, radiation zone, hurt zone, etc.)
OnEntityMarkHostile Entity nonnull object OnEntityMarkHostile(BaseCombatEntity entity, float duration) Useful for denying marking the entity hostile
OnEntityMounted Entity none void OnEntityMounted(BaseMountable entity, BasePlayer player) Called when an entity is mounted by a player
OnEntitySaved Entity none void 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
OnEntitySnapshot Entity nonnull object OnEntitySnapshot(BaseNetworkable entity, Connection connection) Called when an entity snapshot is about to be sent to a client connection
OnEntitySpawned Entity none void OnEntitySpawned(BaseNetworkable entity) Called after any networked entity has spawned (including trees)
OnEntityStabilityCheck Entity nonnull object OnEntityStabilityCheck(StabilityEntity entity) Called when stability of an entity is checked
OnEntityTakeDamage Entity ? 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
OnExcavatorGather Entity nonnull object OnExcavatorGather(ExcavatorArm arm, Item item) Called right before moving gathered resource to container
OnExcavatorMiningToggled Entity none void OnExcavatorMiningToggled(ExcavatorArm arm) Called when excavator mining arm is toggled
OnExcavatorResourceSet Entity nonnull object OnExcavatorResourceSet(ExcavatorArm arm, string resourceName, BasePlayer player) Called when a player is trying to set a new resource target
OnExcavatorSuppliesRequest Electronic data object OnExcavatorSuppliesRequest(ExcavatorSignalComputer computer, BasePlayer player) Called just after the excavator supply computer is triggered, before the plane is spawned.
OnExcavatorSuppliesRequested Electronic ? void OnExcavatorSuppliesRequested(ExcavatorSignalComputer computer, BasePlayer player, BaseEntity cargoPlane) Called after the excavator signal computer was triggered, just after the supply plane is spawned.
OnExperimentEnd Player nonnull object OnExperimentEnd(Workbench workbench) Called when an experiment is about to end
OnExperimentEnded Player none void OnExperimentEnded(Workbench workbench) Called after the experiment has finished
OnExperimentStart Player nonnull object OnExperimentStart(Workbench workbench, BasePlayer player) Called when the player attempts to experiment with at a workbench
OnExperimentStarted Player none void OnExperimentStarted(Workbench workbench, BasePlayer player) Called after the experimentation has started
OnExplosiveDropped Weapon none void OnExplosiveDropped(BasePlayer player, BaseEntity entity, ThrownWeapon item) Called when the player drops an explosive item (C4, grenade, ...)
OnExplosiveDud Weapon nonnull object OnExplosiveDud(DudTimedExplosive explosive) Called when explosive tries to become dud
OnExplosiveFuseSet Weapon nonnull object OnExplosiveFuseSet(TimedExplosive explosive, float fuseLength) Called when a fuse of an explosive is set
OnExplosiveThrown Weapon none void OnExplosiveThrown(BasePlayer player, BaseEntity entity, ThrownWeapon item) Called when the player throws an explosive item (C4, grenade, ...)
OnFindBurnable Item data Item OnFindBurnable(BaseOven oven) Called when looking for fuel for the oven
OnFindSpawnPoint Player data void OnFindSpawnPoint(BasePlayer player) Useful for controlling player spawnpoints (like making all spawns occur in a set area)
OnFireBallDamage Entity none void OnFireBallDamage(FireBall fire, BaseCombatEntity entity, HitInfo info) Called when a fire ball does damage to another entity
OnFireBallSpread Entity none void OnFireBallSpread(FireBall ball, BaseEntity fire) Called when a fire ball fire spreads
OnFishCatch Fishing nonnull Item OnFishCatch(Item item, BaseFishingRod rod, BasePlayer player) Called after a fish is caught, before the item is given
OnFishCaught Fishing none void OnFishCaught(ItemDefinition definition, BaseFishingRod rod, BasePlayer player) Called after a fish is caught
OnFishingStopped Fishing none void OnFishingStopped(BaseFishingRod rod, BaseFishingRod.FailReason reason) Called just after the fishing minigame has been stopped.
OnFlameExplosion Entity none void OnFlameExplosion(FlameExplosive explosive, BaseEntity flame) Called when a flame explodes
OnFlameThrowerBurn Weapon none void OnFlameThrowerBurn(FlameThrower thrower, BaseEntity flame) Called when the burn from a flame thrower spreads
OnFrame Server 1 none void OnFrame() Called each frame
OnFuelAmountCheck Vehicle data object OnFuelAmountCheck(EntityFuelSystem fuelSystem, Item fuelItem) Called when the amount of fuel in a vehicle is being determined
OnFuelCheck Vehicle bool object OnFuelCheck(EntityFuelSystem fuelSystem) Called when determining whether a vehicle has sufficient fuel
OnFuelConsume Item nonnull object OnFuelConsume(BaseOven oven, Item fuel, ItemModBurnable burnable) Called right before fuel is used (furnace, lanterns, camp fires, etc.)
OnFuelConsumed Item none void OnFuelConsumed(BaseOven oven, Item fuel, ItemModBurnable burnable) Called after fuel is used (furnace, lanterns, camp fires, etc.)
OnFuelItemCheck Vehicle data object OnFuelItemCheck(EntityFuelSystem fuelSystem, StorageContainer fuelContainer) Called when determining which item should be used to fuel a vehicle
OnGiveSoldItem Vending nonnull object OnGiveSoldItem(NPCVendingMachine vending, Item soldItem, BasePlayer buyer) ;; object OnGiveSoldItem(VendingMachine vending, Item soldItem, BasePlayer buyer) Called before a sold item is given
OnGroupCreated Permission 1 none void OnGroupCreated(string name) Called when a group has been created successfully
OnGroupDeleted Permission 1 none void OnGroupDeleted(string name) Called when a group has been deleted successfully
OnGroupParentSet Permission 1 none void OnGroupParentSet(string name, string parent) Called when a group parent has been updated
OnGroupPermissionGranted Permission 1 none void OnGroupPermissionGranted(string name, string perm) Called when a permission has been granted to a group
OnGroupPermissionRevoked Permission 1 none void OnGroupPermissionRevoked(string name, string perm) Called when a permission has been revoked from a group
OnGroupRankSet Permission 1 none void OnGroupRankSet(string name, int rank) Called when a group rank has been updated
OnGroupTitleSet Permission 1 none void OnGroupTitleSet(string name, string title) Called when a group title has been updated
OnGrowableGather Resource nonnull object OnGrowableGather(GrowableEntity plant, BasePlayer player) Called when the player gathers a growable entity
OnGrowableGathered Resource none void OnGrowableGathered(GrowableEntity plant, Item item, BasePlayer player) Called before the player receives an item from gathering a growable entity
OnHammerHit Structure nonnull object OnHammerHit(BasePlayer player, HitInfo info) Called when the player has hit something with a hammer
OnHealingItemUse Item nonnull object OnHealingItemUse(MedicalTool tool, BasePlayer player) Called when a player attempts to use a medical tool
OnHelicopterAttack Entity nonnull object OnHelicopterAttack(CH47HelicopterAIController heli) Called when a CH47 helicopter is being attacked
OnHelicopterDropCrate Entity nonnull object OnHelicopterDropCrate(CH47HelicopterAIController heli) Called when a CH47 helicopter is dropping a crate
OnHelicopterDropDoorOpen Entity nonnull object OnHelicopterDropDoorOpen(CH47HelicopterAIController heli) Called when a CH47 helicopter is opening its drop door
OnHelicopterKilled Entity nonnull object OnHelicopterKilled(CH47HelicopterAIController heli) Called when a CH47 helicopter is going to be killed
OnHelicopterOutOfCrates Entity bool bool? OnHelicopterOutOfCrates(CH47HelicopterAIController heli) Called when a CH47 helicopter runs out of crates
OnHelicopterRetire Entity nonnull object OnHelicopterRetire(PatrolHelicopterAI helicopter) Called before the patrol helicopter starts leaving the map.
OnHelicopterStrafeEnter Entity nonnull object OnHelicopterStrafeEnter(PatrolHelicopterAI helicopter, Vector3 strafePosition) Called when helicopter is entering strafe
OnHelicopterTarget Entity nonnull object OnHelicopterTarget(HelicopterTurret turret, BaseCombatEntity entity) Called when a helicopter turret attempts to target an entity
OnHorseHitch Entity nonnull object OnHorseHitch(RidableHorse horse, HitchTrough hitch) Called just before setting the hitch
OnHorseLead Entity nonnull object OnHorseLead(BaseRidableAnimal animal, BasePlayer player) Called when a player tries to lead a horse
OnHotAirBalloonToggle Vehicle nonnull object OnHotAirBalloonToggle(HotAirBalloon balloon, BasePlayer player) Called when a player tries to toggle a hot air balloon on or off
OnHotAirBalloonToggled Vehicle none void OnHotAirBalloonToggled(HotAirBalloon balloon, BasePlayer player) Called right after a player has toggled a hot air balloon on or off
OnIngredientsCollect Item nonnull bool? OnIngredientsCollect(ItemCrafter itemCrafter, ItemBlueprint blueprint, ItemCraftTask task, int amount, BasePlayer player) Called when ingredients are about to be collected for crafting an item
OnInputUpdate Entity nonnull object OnInputUpdate(IOEntity entity, int inputAmount, int slot) Called when an input of IOEntity is updated
OnInventoryNetworkUpdate Player nonnull object 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
OnIORefCleared Entity none void 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
OnItemAction Item nonnull object OnItemAction(Item item, string action, BasePlayer player) Called when a button is clicked on an item in the inventory (drop, unwrap, ...)
OnItemAddedToContainer Item none void 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
OnItemCraft Item bool object OnItemCraft(ItemCraftTask task, BasePlayer player, Item item) Called just before an item is added to the crafting queue
OnItemCraftCancelled Item none void OnItemCraftCancelled(ItemCraftTask task) Called before an item has been crafted
OnItemCraftFinished Item none void OnItemCraftFinished(ItemCraftTask task, Item item) Called right after an item has been crafted
OnItemDeployed Item none void OnItemDeployed(Deployer deployer, BaseEntity entity, BaseEntity slotEntity) Called right after an item has been deployed
OnItemDropped Item none void OnItemDropped(Item item, BaseEntity entity) Called right after an item has been dropped
OnItemLock Item nonnull object OnItemLock(Item item) Called right before an item is locked, such as in a modular car inventory
OnItemPickup Item nonnull object OnItemPickup(Item item, BasePlayer player) Called right after an item has been picked up
OnItemRecycle Entity nonnull object OnItemRecycle(Item item, Recycler recycler) Called when an item is recycled in a recycler
OnItemRefill Item nonnull object OnItemRefill(Item item, BasePlayer player) Called right before an item such as a diving tank is repaired without using a repair bench
OnItemRemove Item data object OnItemRemove(Item item) ;; void OnItemRemove(Item item) Called before an item is destroyed
OnItemRemovedFromContainer Item none void 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
OnItemRepair Item nonnull object OnItemRepair(BasePlayer player, Item item) Called right before an item is repaired
OnItemResearch Item none void OnItemResearch(ResearchTable table, Item targetItem, BasePlayer player) Called right before a player begins to research an item
OnItemResearched Item data float OnItemResearched(ResearchTable table, float chance) Called right before a player finishes researching an item
OnItemSplit Item data Item OnItemSplit(Item item, int amount) Called right before an item is split into multiple stacks
OnItemStacked Item none void OnItemStacked(Item destinationItem, Item sourceItem, ItemContainer destinationContainer) Called after an item has been stacked
OnItemSubmit Item nonnull object OnItemSubmit(Item item, Mailbox mailbox, BasePlayer player) Called when a player submits an item into a mailbox or dropbox
OnItemUnlock Item nonnull object OnItemUnlock(Item item) Called right before an item is unlocked, such as in a modular car inventory
OnItemUpgrade Item none void OnItemUpgrade(Item item, Item upgraded, BasePlayer player) Called right before an item is upgraded
OnItemUse Item data int OnItemUse(Item item, int amountToUse) Called when an item is used
OnLiftUse Entity nonnull object OnLiftUse(Lift lift, BasePlayer player) ;; object OnLiftUse(ProceduralLift lift, BasePlayer player) Called when a player calls a lift or procedural lift
OnLiquidVesselFill Entity nonnull object OnLiquidVesselFill(BaseLiquidVessel liquidVessel, BasePlayer player, LiquidContainer facingLiquidContainer) Called when a player is attempting to fill a liquid vessel
OnLockerSwap Entity data object OnLockerSwap(Locker locker, int startIndex, BasePlayer player) Called when a player clicks the "Swap" button while viewing a locker interface
OnLootEntity Player none void OnLootEntity(BasePlayer player, BaseEntity entity) Called when the player starts looting an entity
OnLootEntityEnd Player none void OnLootEntityEnd(BasePlayer player, BaseCombatEntity entity) Called when the player stops looting an entity
OnLootItem Player none void OnLootItem(PlayerLoot playerLoot, Item item) Called when the player starts looting an item
OnLootNetworkUpdate Player nonnull object OnLootNetworkUpdate(PlayerLoot loot) Called when a player is trying to loot a container or a container they are looting has changed its contents
OnLootPlayer Player none void OnLootPlayer(BasePlayer player, BasePlayer target) Called when the player starts looting another player
OnLootSpawn Entity nonnull object OnLootSpawn(LootContainer container) Called when loot spawns in a container
OnLoseCondition Item none void OnLoseCondition(Item item, ref float amount) Called right before the condition of the item is modified
OnMagazineReload Weapon nonnull object OnMagazineReload(BaseProjectile weapon, IAmmoContainer desiredAmount, BasePlayer player) Called when the player reloads a magazine
OnMapImageUpdated Item none void OnMapImageUpdated() Called when player updates map item's image; Useful for executing any action when map image is updated
OnMapMarkerAdd Player nonnull object OnMapMarkerAdd(BasePlayer player, MapNote note) Called when trying to add a marker
OnMapMarkerAdded Player none void OnMapMarkerAdded(BasePlayer player, MapNote note) Called after a marker was added
OnMapMarkerRemove Player nonnull object OnMapMarkerRemove(BasePlayer player, MapNote note) Called when trying to remove a marker
OnMapMarkersClear Player nonnull object OnMapMarkersClear(BasePlayer player, List<MapNote> notes) Called when trying to clear map markers
OnMapMarkersCleared Player none void OnMapMarkersCleared(BasePlayer player, List<MapNote> notes) Called after markers were cleared
OnMaxStackable Item data int OnMaxStackable(Item item) Called when an items max stackable is calculated
OnMeleeAttack Player nonnull object OnMeleeAttack(BasePlayer player, HitInfo info) Useful for canceling melee attacks
OnMeleeThrown Weapon none void OnMeleeThrown(BasePlayer player, Item item) Called when the player throws a melee item (axe, rock, ...)
OnMessagePlayer Server nonnull object OnMessagePlayer(string message, BasePlayer player) Useful for intercepting server messages before they get to their intended target
OnMlrsFire Entity nonnull object OnMlrsFire(MLRS mlrs, BasePlayer player) Called just before the MLRS is fired.
OnMlrsFired Entity none void OnMlrsFired(MLRS mlrs, BasePlayer player) Called just after the MLRS has been fired.
OnNetworkGroupEntered Player none void OnNetworkGroupEntered(BasePlayer player, Network.Visibility.Group group) Called after a player has entered a network group
OnNetworkGroupLeft Player none void OnNetworkGroupLeft(BasePlayer player, Network.Visibility.Group group) Called after a player has left a network group
OnNetworkSubscriptionsUpdate Entity nonnull object 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
OnNewSave Server none void OnNewSave(string filename) Called when a new savefile is created (usually when map has wiped)
OnNpcConversationEnded Player none void OnNpcConversationEnded(NPCTalking npcTalking, BasePlayer player) Called right after a player has ended an NPC conversation
OnNpcConversationRespond Player nonnull object OnNpcConversationRespond(NPCTalking npcTalking, BasePlayer player, ConversationData conversationData, ConversationData.ResponseNode responseNode) Called when a player chooses an NPC conversation response
OnNpcConversationResponded Player none void OnNpcConversationResponded(NPCTalking npcTalking, BasePlayer player, ConversationData conversationData, ConversationData.ResponseNode responseNode) Called right after a player's chosen NPC conversation response has been processed
OnNpcConversationStart Player nonnull object OnNpcConversationStart(NPCTalking npcTalking, BasePlayer player, ConversationData conversationData) Called when a player tries to start a conversation with an NPC
OnNpcDestinationSet Entity nonnull object OnNpcDestinationSet(NPCPlayerApex npc, Vector3 newPosition) Useful for canceling the destination change on NPCs
OnNpcGiveSoldItem Vending nonnull object 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.
OnNpcPlayerResume Entity nonnull object OnNpcPlayerResume(NPCPlayerApex npc) Useful for canceling the invoke of TryForceToNavmesh
OnNpcStopMoving Entity nonnull object OnNpcStopMoving(NPCPlayerApex npc) Useful for denying the move stop of NPCs
OnNpcTarget Entity nonnull object OnNpcTarget(BaseEntity npc, BaseEntity entity) Called when an NPC targets another entity
OnNpcTargetSense Entity nonnull object OnNpcTargetSense(BaseEntity owner, BaseEntity entity, AIBrainSenses brainSenses) Called when an NPC becomes aware of another entity
OnOpenVendingAdmin Vending none void OnOpenVendingAdmin(VendingMachine machine, BasePlayer player) Called when a player opens the admin ui for a vending machine
OnOutputUpdate Entity nonnull object OnOutputUpdate(IOEntity entity) Called when outputs of IOEntity are updated
OnOvenCook Entity nonnull object OnOvenCook(BaseOven oven, Item item) Called before an oven cooks an item
OnOvenCooked Entity none void OnOvenCooked(BaseOven oven, Item item, BaseEntity slot) Called after an oven cooks an item
OnOvenToggle Entity nonnull object OnOvenToggle(BaseOven oven, BasePlayer player) Called when an oven (Campfire, Furnace,...) is turned on or off
OnPayForPlacement Player nonnull object 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
OnPayForUpgrade Player nonnull object OnPayForUpgrade(BasePlayer player, BuildingBlock block, ConstructionGrade gradeTarget) Called when player is paying for an upgrade. Useful for preventing paying for block upgrade
OnPermissionRegistered Permission 1 none void OnPermissionRegistered(string name, Plugin owner) Called when a permission has been registered
OnPhoneAnswer Phone nonnull object OnPhoneAnswer(PhoneController receiverPhone, PhoneController callerPhone) Called when a player tries to answer a phone call
OnPhoneAnswered Phone none void OnPhoneAnswered(PhoneController receiverPhone, PhoneController callerPhone) Called right after a player has answered a phone call
OnPhoneCallStart Phone nonnull object OnPhoneCallStart(PhoneController phone, PhoneController otherPhone, BasePlayer player) Called after a phone has been answered, right before voice communication is established
OnPhoneCallStarted Phone ? void OnPhoneCallStarted(PhoneController phone, PhoneController otherPhone, BasePlayer player) Called right after a phone call has been answered and voice communication has been established
OnPhoneDial Phone nonnull object OnPhoneDial(PhoneController callerPhone, PhoneController receiverPhone, BasePlayer player) Called when a player places a phone call
OnPhoneDialFail Phone nonnull object OnPhoneDialFail(PhoneController phone, Telephone.DialFailReason reason, BasePlayer player) Called when a phone call is about to end or fail to start
OnPhoneDialFailed Phone none void OnPhoneDialFailed(PhoneController phone, Telephone.DialFailReason reason, BasePlayer player) Called after a phone call has ended or failed to start
OnPhoneDialTimedOut Phone none void 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
OnPhoneDialTimeout Phone nonnull object 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
OnPhoneNameUpdate Phone nonnull object OnPhoneNameUpdate(PhoneController phoneController, string name, BasePlayer player) Called when a player tries to update a phone name
OnPhoneNameUpdated Phone none void OnPhoneNameUpdated(PhoneController phoneController, string name, BasePlayer player) Called after a player has updated a phone name
OnPlayerAddModifiers Player nonnull object OnPlayerAddModifiers(BasePlayer player, Item item, ItemModConsumable consumable) Called after a player consumes an item such as tea that is about to apply modifiers
OnPlayerAssist Player nonnull object OnPlayerAssist(BasePlayer target, BasePlayer player) Called when a player tries to assist target player (when target is wounded)
OnPlayerAttack Player nonnull object 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
OnPlayerBanned Player none void OnPlayerBanned(string name, ulong id, string address, string reason) Called when the player is banned (Facepunch, EAC, server ban, etc.)
OnPlayerChat Player nonnull object OnPlayerChat(BasePlayer player, string message, Chat.ChatChannel channel) Called when the player sends chat to the server
OnPlayerCommand Player nonnull object OnPlayerCommand(BasePlayer player, string command, string[] args) Useful for intercepting players' commands before their handling
OnPlayerConnected Player none void OnPlayerConnected(BasePlayer player) Called after the player object is created, but before the player has spawned
OnPlayerCorpse Player none void OnPlayerCorpse(BasePlayer player, BaseCorpse corpse) Called when a non-null corpse has just been spawned
OnPlayerCorpseSpawn Player nonnull object OnPlayerCorpseSpawn(BasePlayer player) Called when a non-null corpse is about to spawn
OnPlayerCorpseSpawned Player none void OnPlayerCorpseSpawned(BasePlayer player, PlayerCorpse corpse) Called when a non-null corpse has just been spawned
OnPlayerDeath Player nonnull object OnPlayerDeath(BasePlayer player, HitInfo info) Called when the player is about to die; HitInfo may be null sometimes
OnPlayerDisconnected Player none void OnPlayerDisconnected(BasePlayer player, string reason) Called after the player has disconnected from the server
OnPlayerDropActiveItem Player none void OnPlayerDropActiveItem(BasePlayer player, Item item) Called when the player drops their active held item
OnPlayerHealthChange Player nonnull object OnPlayerHealthChange(BasePlayer player, float oldValue, float newValue) Called just before the player's health changes
OnPlayerInput Player none void OnPlayerInput(BasePlayer player, InputState input) Called when input is received from a connected client
OnPlayerKeepAlive Player nonnull object OnPlayerKeepAlive(BasePlayer player, BasePlayer target) Called before a player is kept alive (Example: You started "helping" player, it keeps him alive for at least 10 seconds more to be sure he won't die until you finish picking him up)
OnPlayerKicked Player none void OnPlayerKicked(BasePlayer player, string reason) Called after the player is kicked from the server
OnPlayerLand Player nonnull object OnPlayerLand(BasePlayer player, float num) Called just before the player lands on the ground
OnPlayerLanded Player none void OnPlayerLanded(BasePlayer player, float num) Called when the player landed on the ground
OnPlayerLootEnd Player none void OnPlayerLootEnd(PlayerLoot inventory) Called when the player stops looting
OnPlayerMetabolize Player none void OnPlayerMetabolize(PlayerMetabolism metabolism, BaseCombatEntity entity, float delta) Called after the player's metabolism has been changed
OnPlayerRecover Player nonnull object OnPlayerRecover(BasePlayer player) Called when the player is about to recover from the 'wounded' state
OnPlayerRecovered Player none void OnPlayerRecovered(BasePlayer player) Called when the player was recovered
OnPlayerReported Player none void OnPlayerReported(BasePlayer reporter, string targetName, string targetId, string subject, string message, string type) Called when a player has reported someone via F7
OnPlayerRespawn Player data object OnPlayerRespawn(BasePlayer player, BasePlayer.SpawnPoint spawnPoint) ;; object OnPlayerRespawn(BasePlayer player, SleepingBag sleepingBag) Called when a player is attempting to respawn
OnPlayerRespawned Player none void OnPlayerRespawned(BasePlayer player) Called when the player has respawned (specifically when they click the "Respawn" button); ONLY called after the player has transitioned from dead to not-dead, so not when they're waking up; This means it's possible for the player to connect and disconnect from a server without OnPlayerRespawned ever triggering for them
OnPlayerRevive Player nonnull object OnPlayerRevive(BasePlayer reviver, BasePlayer player) Called before the recover after reviving with a medical tool; Useful for canceling the reviving
OnPlayerSetInfo Player none void OnPlayerSetInfo(Connection connection, string key, string value) Called when setting player's information *(aka console variables)*
OnPlayerSleep Player nonnull object OnPlayerSleep(BasePlayer player) Called when the player is about to go to sleep
OnPlayerSleepEnded Player none void OnPlayerSleepEnded(BasePlayer player) Called when the player awakes
OnPlayerSpawn Player data object OnPlayerSpawn(BasePlayer player) Called when a player is attempting to spawn for the first time
OnPlayerSpectate Player nonnull object OnPlayerSpectate(BasePlayer player, string spectateFilter) Called when the player starts spectating
OnPlayerSpectateEnd Player nonnull object OnPlayerSpectateEnd(BasePlayer player, string spectateFilter) Called when the player stops spectating
OnPlayerTick Player nonnull object OnPlayerTick(BasePlayer player, PlayerTick msg, bool wasPlayerStalled)
OnPlayerViolation Player nonnull object OnPlayerViolation(BasePlayer player, AntiHackType type, float amount) Called when the player triggers an anti-hack violation
OnPlayerVoice Player nonnull object OnPlayerVoice(BasePlayer player, Byte[] data) Called when the player uses the in-game voice chat
OnPlayerWound Player nonnull object 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
OnPluginLoaded Server 1 none void OnPluginLoaded(Plugin plugin) Called when any plugin has been loaded; Not to be confused with [`Loaded`](#loaded)
OnPluginUnloaded Server 1 none void OnPluginUnloaded(Plugin plugin) Called when any plugin has been unloaded; Not to be confused with [`Unload`](#unload)
OnProjectileRicochet Weapon nonnull object OnProjectileRicochet(BasePlayer player, PlayerProjectileRicochet ricochet) Called when a player's weapon projectile ricochets
OnQuarryEnabled Resource none void OnQuarryEnabled(MiningQuarry quarry) Called when a mining quarry is turned on/enabled
OnQuarryGather Resource none void OnQuarryGather(MiningQuarry quarry, Item item) Called before items are gathered from a quarry
OnQuarryToggled Resource none void OnQuarryToggled(MiningQuarry quarry, BasePlayer player) Called when a quarry has just been toggled
OnRconCommand Server none void OnRconCommand(IPAddress ip, string command, string[] args) Called when an RCON command is run
OnRconConnection Server nonnull object OnRconConnection(IPAddress ip) Called when a new RCON connection is opened
OnReactiveTargetReset Entity none void OnReactiveTargetReset(ReactiveTarget target) Called after the reactive target is reset
OnRecyclerToggle Entity nonnull object OnRecyclerToggle(Recycler recycler, BasePlayer player) Called when a recycler is turned on or off
OnRefreshVendingStock Vending none void OnRefreshVendingStock(VendingMachine machine, Item item) Called when the stock on a vending machine is updated
OnRemoveDying Resource nonnull object OnRemoveDying(GrowableEntity plant, BasePlayer player) Called when a player is trying to harvest a dying growable entity
OnResearchCostDetermine Item data object 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
OnResourceDepositCreated Entity none void OnResourceDepositCreated(ResourceDepositManager.ResourceDeposit deposit) Called when a resource deposit has been created
OnRespawnInformationGiven Player none void OnRespawnInformationGiven(BasePlayer player, RespawnInformation respawnInformation) Called when a player is about to be sent respawn information
OnRfBroadcasterAdd Entity nonnull object OnRfBroadcasterAdd(IRFObject obj, int frequency) Called right before an object starts broadcasting an RF frequency
OnRfBroadcasterAdded Entity none void OnRfBroadcasterAdded(IRFObject obj, int frequency) Called right after an object has started broadcasting an RF frequency
OnRfBroadcasterRemove Entity nonnull object OnRfBroadcasterRemove(IRFObject obj, int frequency) Called right before an object stops broadasting an RF frequency
OnRfBroadcasterRemoved Entity none void OnRfBroadcasterRemoved(IRFObject obj, int frequency) Called right after an object has stopped broadcasting an RF frequency
OnRfFrequencyChange Entity nonnull object 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
OnRfFrequencyChanged Entity none void OnRfFrequencyChanged(IRFObject obj, int frequency, BasePlayer player) Called after a player has changed the frequency of an RF broadcaster or receiver
OnRfListenerAdd Entity nonnull object OnRfListenerAdd(IRFObject obj, int frequency) Called right before an object starts listening to an RF frequency
OnRfListenerAdded Entity none void OnRfListenerAdded(IRFObject obj, int frequency) Called right after an object has started listening to an RF frequency
OnRfListenerRemove Entity nonnull object OnRfListenerRemove(IRFObject obj, int frequency) Called right before an object stops listening to an RF frequency
OnRfListenerRemoved Entity none void OnRfListenerRemoved(IRFObject obj, int frequency) Called right after an object has stopped listening to an RF frequency
OnRidableAnimalClaim Entity nonnull object OnRidableAnimalClaim(BaseRidableAnimal animal, BasePlayer player) Called when a player tries to claim a horse
OnRidableAnimalClaimed Entity none void OnRidableAnimalClaimed(BaseRidableAnimal animal, BasePlayer player) Called after a player has claimed a horse
OnRocketLaunched Weapon none void OnRocketLaunched(BasePlayer player, BaseEntity entity) Called when the player launches a rocket
OnRotateVendingMachine Vending nonnull object OnRotateVendingMachine(VendingMachine machine, BasePlayer player) Called when a player attempts to rotate a vending machine
OnRunPlayerMetabolism Player nonnull object 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
OnSamSiteTarget Entity nonnull object OnSamSiteTarget(SamSite samSite, BaseCombatEntity target) Called before last target visible time is updated
OnSaveLoad Server nonnull object OnSaveLoad(Dictionary<BaseEntity, ProtoBuf.Entity> entities) Called when a save file is loaded
OnSendCommand Player nonnull object 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.
OnServerCommand Server nonnull object OnServerCommand(ConsoleSystem.Arg arg) Useful for intercepting commands before they get to their intended target
OnServerInformationUpdated Server none void OnServerInformationUpdated() Called after all steam information for the server has has been updated
OnServerInitialized Server 1 none void 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
OnServerMessage Server data object 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
OnServerRestartInterrupt Server nonnull object OnServerRestartInterrupt() Called when a server restart is being cancelled
OnServerSave Server 1 none void OnServerSave() Called before the server saves
OnServerShutdown Server none void OnServerShutdown() Useful for saving something / etc on server shutdown
OnShopAcceptClick Entity nonnull object OnShopAcceptClick(ShopFront entity, BasePlayer player) Called when a player is trying to accept a trade in ShopFront
OnShopCancelClick Entity nonnull object OnShopCancelClick(ShopFront entity, BasePlayer player) Called when a player is cancelling a trade
OnShopCompleteTrade Entity nonnull object OnShopCompleteTrade(ShopFront entity) Called before the trade is completed in ShopFront
OnShopCompleteTrade Entity nonnull object OnShopCompleteTrade(ShopFront shop, BasePlayer customer) Called when a shopfront trade is complete
OnSignLocked Sign none void OnSignLocked(Signage sign, BasePlayer player) ;; void OnSignLocked(PhotoFrame photoFrame, BasePlayer player) Called after the player has locked a sign or photo frame
OnSignUpdated Sign none void 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
OnSleepingBagDestroy Entity nonnull object OnSleepingBagDestroy(SleepingBag sleepingBag, BasePlayer player) Called when a player tries to remove a sleeping bag from their respawn screen
OnSleepingBagDestroyed Entity none void OnSleepingBagDestroyed(SleepingBag sleepingBag, BasePlayer player) Called after a player removes a sleeping bag from their respawn screen
OnSleepingBagValidCheck Entity bool bool? 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
OnSolarPanelSunUpdate Entity nonnull object OnSolarPanelSunUpdate(SolarPanel panel, int currentEnergy) Called when a solar panel updates the amount of energy it is getting from the sun
OnSpinWheel Sign none void OnSpinWheel(BasePlayer player, SpinnerWheel wheel) Called when the player spins a spinner wheel
OnStashExposed Player none void OnStashExposed(StashContainer stash, BasePlayer player) Called when a player reveals a hidden stash
OnStashHidden Player none void OnStashHidden(StashContainer stash, BasePlayer player) Called when a player hides a stash
OnStructureDemolish Structure nonnull object OnStructureDemolish(BaseCombatEntity entity, BasePlayer player, bool immediate) Called when the player selects Demolish or DemolishImmediate from the BuildingBlock or BaseCombatEntity menu
OnStructureRepair Structure nonnull object OnStructureRepair(BaseCombatEntity entity, BasePlayer player) Called when the player repairs a BuildingBlock or BaseCombatEntity
OnStructureRotate Structure nonnull object OnStructureRotate(BaseCombatEntity entity, BasePlayer player) Called when the player rotates a BuildingBlock or BaseCombatEntity
OnStructureUpgrade Structure nonnull object OnStructureUpgrade(BaseCombatEntity entity, BasePlayer player, BuildingGrade.Enum grade) Called when the player upgrades the grade of a BuildingBlock or BaseCombatEntity
OnSupplyDropDropped Entity none void OnSupplyDropDropped(SupplyDrop supplyDrop, CargoPlane cargoPlane) Called right after a cargo plane has dropped a supply drop
OnSupplyDropLanded Entity none void OnSupplyDropLanded(SupplyDrop entity) Called after Supply Drop has landed
OnSurveyGather Resource none void OnSurveyGather(SurveyCharge survey, Item item) Called before items are gathered from a survey charge
OnSwitchToggle Entity nonnull object OnSwitchToggle(IOEntity entity, BasePlayer player) Called when a player tries to switch and ElectricSwitch or FuelGenerator
OnSwitchToggled Entity none void OnSwitchToggled(IOEntity entity, BasePlayer player) Called right after a player switches an ElectricSwitch or FuelGenerator
OnTakeCurrencyItem Vending nonnull object OnTakeCurrencyItem(VendingMachine vending, Item item) Called before currency item is taken
OnTeamAcceptInvite Team nonnull object OnTeamAcceptInvite(RelationshipManager.PlayerTeam team, BasePlayer player) Useful for canceling team invitation acceptation
OnTeamCreate Team nonnull object OnTeamCreate(BasePlayer player) Useful for canceling team creation
OnTeamCreated Team none void OnTeamCreated(BasePlayer player, RelationshipManager.PlayerTeam team) Called after a team was created
OnTeamDisband Team nonnull object OnTeamDisband(RelationshipManager.PlayerTeam team) Useful for canceling team disbandment
OnTeamDisbanded Team none void OnTeamDisbanded(RelationshipManager.PlayerTeam team) Called when the team was disbanded
OnTeamInvite Team nonnull object OnTeamInvite(BasePlayer inviter, BasePlayer target) Useful for canceling an invitation
OnTeamKick Team nonnull object OnTeamKick(RelationshipManager.PlayerTeam team, BasePlayer player, ulong target) Useful for canceling kick of the player from the team
OnTeamLeave Team nonnull object OnTeamLeave(RelationshipManager.PlayerTeam team, BasePlayer player) Useful for canceling the leave from the team
OnTeamPromote Team nonnull object OnTeamPromote(RelationshipManager.PlayerTeam team, BasePlayer newLeader) Useful for canceling player's promotion in the team
OnTeamRejectInvite Team nonnull object OnTeamRejectInvite(BasePlayer rejector, RelationshipManager.PlayerTeam team) Useful for canceling the invitation rejection
OnTeamUpdate Team nonnull object OnTeamUpdate(ulong currentTeam, ulong newTeam, BasePlayer player) Called when player's team is updated
OnTeamUpdated Team nonnull object OnTeamUpdated(ulong currentTeam, PlayerTeam playerTeam, BasePlayer player) Called before sending team info to player
OnTechTreeNodeUnlock TechTree nonnull object 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)
OnTechTreeNodeUnlocked TechTree none void 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
OnTerrainInitialized Terrain none void OnTerrainInitialized() Called after the terrain generation process has completed
OnThreatLevelUpdate Player nonnull object OnThreatLevelUpdate(BasePlayer player) Called when a player's threat level is about to be updated
OnTick Server none void OnTick() Called every tick (defined by the tick rate of the server); For better performance, avoid using heavy calculations in this hook.
OnToggleVendingBroadcast Vending none void OnToggleVendingBroadcast(VendingMachine machine, BasePlayer player) Called when a player toggles the broadcasting of the vending machine
OnTrapArm Item nonnull object OnTrapArm(BearTrap trap, BasePlayer player) Called when the player arms a bear trap
OnTrapDisarm Item nonnull object OnTrapDisarm(Landmine trap, BasePlayer player) Called when the player disarms a land mine
OnTrapSnapped Item none void OnTrapSnapped(BaseTrapTrigger trap, GameObject go) Called when a trap is triggered by a game object
OnTrapTrigger Item nonnull object OnTrapTrigger(BaseTrap trap, GameObject go) Called when a trap is triggered by a game object
OnTreeMarkerHit Resource bool bool? OnTreeMarkerHit(TreeEntity tree, HitInfo info) Called when a player hits a tree with a tool (rock, hatchet, etc.)
OnTurretAssign Entity nonnull object OnTurretAssign(AutoTurret turret, ulong targetId, BasePlayer initiator) Called when a player attempts to authorize another player on a turret
OnTurretAssigned Entity none void OnTurretAssigned(AutoTurret turret, ulong targetId, BasePlayer initiator) Called when a player has been authorized on a turret by another player
OnTurretAuthorize Entity nonnull object OnTurretAuthorize(AutoTurret turret, BasePlayer player) Called when a player attempts to authorize on a turret
OnTurretClearList Entity nonnull object OnTurretClearList(AutoTurret turret, BasePlayer player) Called when a player attempts to clear an autoturret's authorized list
OnTurretDeauthorize Entity nonnull object OnTurretDeauthorize(AutoTurret turret, BasePlayer player) Called when a player is deauthorized on an autoturret
OnTurretModeToggle Entity none void OnTurretModeToggle(AutoTurret turret) Called when the mode of an autoturrent is toggled
OnTurretRotate Entity nonnull object OnTurretRotate(AutoTurret turret, BasePlayer player) Called when a player tries to rotate an auto turret
OnTurretShutdown Entity nonnull object OnTurretShutdown(AutoTurret turret) Called when an autoturret is shut down
OnTurretStartup Entity nonnull object OnTurretStartup(AutoTurret turret) Called when an autoturret starts up
OnTurretTarget Entity nonnull object OnTurretTarget(AutoTurret turret, BaseCombatEntity entity) Called when an autoturret attempts to target an entity
OnTurretToggle Entity nonnull object OnTurretToggle(AutoTurret turret) Called when an autoturret toggles powerstate (on/off)
OnUserApprove Player nonnull object OnUserApprove(Network.Connection connection) Used by RustCore and abstracted into CanClientLogin
OnUserApproved Player 1 none void OnUserApproved(string name, string id, string ipAddress) Called after a player is approved to connect to the server
OnUserBanned Player 1 none void 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
OnUserChat Player 1 data object OnUserChat(IPlayer player, string message) Called when a player sends a chat message to the server
OnUserCommand Player 1 nonnull object OnUserCommand(IPlayer player, string command, string[] args) Useful for intercepting players' commands before their handling
OnUserConnected Player 1 none void OnUserConnected(IPlayer player) Called after a player has been approved and has connected to the server
OnUserDisconnected Player 1 none void OnUserDisconnected(IPlayer player) Called after a player has disconnected from the server
OnUserGroupAdded Player 1 none void OnUserGroupAdded(string id, string groupName) Called when a player has been added to a group
OnUserGroupRemoved Player 1 none void OnUserGroupRemoved(string id, string groupName) Called when a player has been removed from a group
OnUserKicked Player 1 none void OnUserKicked(IPlayer player, string reason) Called when a player has been kicked from the server
OnUserNameUpdated Player 1 none void OnUserNameUpdated(string id, string oldName, string newName) Called when a player's stored nickname has been changed
OnUserPermissionGranted Player 1 none void OnUserPermissionGranted(string id, string permName) Called when a permission has been granted to a player
OnUserPermissionRevoked Player 1 none void OnUserPermissionRevoked(string id, string permName) Called when a permission has been revoked from a player
OnUserRespawn Player 1 none void OnUserRespawn(IPlayer player) Called when a player is respawning
OnUserRespawned Player 1 none void OnUserRespawned(IPlayer player) Called after a player has respawned
OnUserUnbanned Player 1 none void OnUserUnbanned(string name, string id, string ipAddress) Called when a player has been unbanned from the server
OnVehicleModuleDeselected Vehicle none void OnVehicleModuleDeselected(ModularCarGarage carLift, BasePlayer player) Called right after a player deselects a vehicle module item in a car's inventory
OnVehicleModuleMove Vehicle nonnull object OnVehicleModuleMove(BaseVehicleModule module, BaseModularVehicle vehicle, BasePlayer player) Called when a player tries to move a vehicle module item that is currently on a vehicle
OnVehicleModulesAssign Vehicle nonnull object 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
OnVehicleModulesAssigned Vehicle none void 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
OnVehicleModuleSelect Vehicle nonnull object 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
OnVehicleModuleSelected Vehicle none void 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
OnVehiclePush Vehicle nonnull object OnVehiclePush(BaseVehicle vehicle, BasePlayer player) Called when a player tries to push a vehicle
OnVendingShopOpened Vending none void OnVendingShopOpened(VendingMachine machine, BasePlayer player) Called when a player opens the customer ui for a vending machine
OnVendingShopRename Vending nonnull object OnVendingShopRename(VendingMachine vending, string newName, BasePlayer player) Called when a player tries to rename vending shop
OnVendingTransaction Vending bool bool OnVendingTransaction(VendingMachine machine, BasePlayer buyer, int sellOrderId, int numberOfTransactions) Called when a player attempts to buy an item from a vending machine
OnWaterCollect Entity nonnull object OnWaterCollect(WaterCatcher waterCatcher) Called when a water catcher is about to collect water
OnWaterPurified Entity none void OnWaterPurified(WaterPurifier waterPurifier, float timeCooked) Called after salt water has been converted to fresh water in a water purifier
OnWaterPurify Entity nonnull object OnWaterPurify(WaterPurifier waterPurifier, float timeCooked) Called when salt water is about to be converted to fresh water in a water purifier
OnWeaponFired Weapon none void OnWeaponFired(BaseProjectile projectile, BasePlayer player, ItemModProjectile mod, ProtoBuf.ProjectileShoot projectiles) Called when the player fires a weapon
OnWeaponReload Weapon nonnull object OnWeaponReload(BaseProjectile weapon, BasePlayer player) Called when the player reloads a weapon
OnWireClear Entity nonnull object OnWireClear(BasePlayer player, IOEntity entity1, int connected, IOEntity entity2, bool flag) Useful for preventing clearing wires
OnWireConnect Entity nonnull object OnWireConnect(BasePlayer player, IOEntity entity1, int inputs, IOEntity entity2, int outputs) Useful for preventing a wire to connect
OnWorldPrefabSpawned World none void OnWorldPrefabSpawned(GameObject gameObject, string category) Called when a world prefab was spawned
OnWorldProjectileCreate Weapon nonnull object OnWorldProjectileCreate(HitInfo hitInfo, Item item) Called when a projectile is created
Unload Plugin 1 none void Unload() Called when a plugin is being unloaded
Can't render this file because it contains an unexpected character in line 255 and column 129.