Hooks Shared - Chessnut/NutScript GitHub Wiki
Information
The following are shared hooks. Shared means they can be hooked both on the server and client. Usually, they will be required to be placed in a shared file (one that starts with sh_) because the server and client need to share the same behavior. These hooks can be added on to in schemas by defining function SCHEMA:HookName(arguments)
. Plugins follow a similar pattern, but SCHEMA
is replaced with PLUGIN
.
-
void "CharacterLoaded"
Loaded Character Index
This hook get fired when the player loaded his/her character. -
void "PlayerStaminaLost"
Player
This hook is called when player lost his/her stamina. -
boolean "StorageCanTransfer"
Inventory ID
Player
Old X
Old Y
New X
New Y
New Inventory ID
If the hook returns false, the player can’t transfer item to the storage. -
boolean "CanPlayerUseBusiness"
Player
Item ID
If the hook returns false, player can’t use the business menu.