Hooks called by Static Entities

Summary

Hooks

Sandbox's PersistenceLoad hook, run by the plugin in place of Sandbox once the map's entities have been created.
Sandbox's PersistenceSave hook, run by the plugin in place of Sandbox when the server shuts down and whenever the framework saves its data.
Asks the plugins to make the entity a player is looking at static, or to remove its static status.
Called on the server right after the static entities have been copied and saved, so that plugins can undo what they did to their entities in PrePersistenceSave.
Called on the server right before the static entities are copied and saved, so that plugins can prepare their entities for it.

Hooks

Sandbox's PersistenceLoad hook, run by the plugin in place of Sandbox once the map's entities have been created. Handlers spawn what they have saved; the plugin's own handler loads the static entities.

Called from

Call sites

Sandbox's PersistenceSave hook, run by the plugin in place of Sandbox when the server shuts down and whenever the framework saves its data. Handlers save their persistent entities; the plugin's own handler saves the static entities.

Called from

Call sites

PlayerMakeStatic(actor, true)

shared plugins/staticents/plugin/commands/sh_static.lua:22

Asks the plugins to make the entity a player is looking at static, or to remove its static status. Called on the server by the static add and static remove commands and by the Static Add/Remove tool. The plugin's own handler checks the player's permission and the class of the entity, applies the change and notifies the player.

Parameters

  • actor Player The player who makes the request
  • is_static Boolean True to make the entity static and false to make it unstatic

Called from

Call sites

PostPersistenceSave()

server plugins/staticents/plugin/sv_hooks.lua:72

Called on the server right after the static entities have been copied and saved, so that plugins can undo what they did to their entities in PrePersistenceSave. The Containers plugin gives the containers their inventories back here.

Called from

Call sites

PrePersistenceSave()

server plugins/staticents/plugin/sv_hooks.lua:45

Called on the server right before the static entities are copied and saved, so that plugins can prepare their entities for it. The Containers plugin takes the inventory off every container here, so that it is not saved with the container.

Called from

Call sites

Defined in