Plugin (6)

All currently available hooks that are found in Carbon. Most hooks would be ones compatible with Oxide, although there are Carbon-only ones as well.

  • Gets called right after config and lang phrases are read.

  • Called when a plugin is being initialized.

  • Other plugins may or may not be present, dependant on load order.

  • Returning a non-null value cancels default behavior.

  • This hook is compatible within Carbon and Oxide.

  • Patches ModLoader.InitializePlugin.

Example
void Init()
{
    Puts("Init was called!");
}
  • Gets called when originally there aren't message found in the `carbon/lang` folder.

  • Gets called when it initially creates the `carbon/lang` files for the plugin.

  • Called when the localization for a plugin should be registered.

  • Returning a non-null value cancels default behavior.

  • This hook is compatible within Carbon and Oxide.

  • Patches ModLoader.InitializePlugin.

Example
void LoadDefaultMessages()
{
    Puts("LoadDefaultMessages was called!");
}
  • Gets called when the plugin executes the Load method on the plugin.

  • Called when a plugin has finished loading.

  • Other plugins may or may not be present, dependant on load order.

  • Returning a non-null value cancels default behavior.

  • This hook is compatible within Carbon and Oxide.

  • Patches ModLoader.InitializePlugin.

Example
void Loaded()
{
    Puts("Loaded was called!");
}
  • Gets called when the plugin executes the Load method on the plugin.

  • Returning a non-null value cancels default behavior.

  • This hook is Carbon-only compatible.

  • Patches ModLoader.InitializePlugin.

Example
void OnLoaded()
{
    Puts("OnLoaded was called!");
}
  • Gets called whenever a plugin from the Admin module -> Plugins tab is marked as 'auto-updateable' and is outdated.

  • Returning a non-null value cancels default behavior.

  • This hook is Carbon-only compatible.

Example
void OnPluginOutdated(string pluginName, Oxide.Core.VersionNumber currentVersion, Oxide.Core.VersionNumber newVersion, Oxide.Core.Plugins.Plugin plugin, string vendorName)
{
    Puts("OnPluginOutdated was called!");
}
  • Gets called when the plugin has fully shut down and disposed.

  • Called when a plugin is being unloaded.

  • Returning a non-null value cancels default behavior.

  • This hook is compatible within Carbon and Oxide.

  • Patches ModLoader.InitializePlugin.

Example
void Unload()
{
    Puts("Unload was called!");
}

Last updated