Skip to content

Mod Lifecycle

Mods may define lifecycle hooks in their entry script.

function onEnable() {}
function onDisable() {}
function onReload() {}
  • Hooks are invoked only if defined
  • Execution is isolated per mod
  • Errors do not affect other mods

Called when the mod is loaded.

Called when the mod is unloaded.

Called when the mod is reloaded.