Engine (4)

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 when a plugin fails compiling.

  • Returning a non-null value cancels default behavior.

  • This hook is Carbon-only compatible.

  • Patches ScriptLoader.Compile of Carbon.dll.

Example
void OnCompilationFail(string filePath, Carbon.Core.ModLoader.FailedCompilation compilation)
{
    Puts("OnCompilationFail was called!");
}
  • Gets called when a plugin's constructor throws an exception.

  • Fatal error which forcefully unloads the plugin right after.

  • Returning a non-null value cancels default behavior.

  • This hook is Carbon-only compatible.

  • Patches ModLoader.InitializePlugin of Carbon.Common.dll.

Example
void OnConstructorFail(Oxide.Plugins.RustPlugin plugin, System.Exception exception)
{
    Puts("OnConstructorFail was called!");
}
  • Gets called when a plugin is loaded.

  • Called when any plugin has been loaded.

  • Not to be confused with Loaded.

  • Returning a non-null value cancels default behavior.

  • This hook is compatible within Carbon and Oxide.

Example
void OnPluginLoaded(Oxide.Plugins.RustPlugin plugin)
{
    Puts("OnPluginLoaded was called!");
}
  • Gets called when a plugin is unloaded.

  • Called when any plugin has been unloaded.

  • Not to be confused with Unload.

  • Returning a non-null value cancels default behavior.

  • This hook is compatible within Carbon and Oxide.

  • Patches ModLoader.UninitializePlugin of Carbon.Common.dll.

Example
void OnPluginUnloaded(Oxide.Plugins.RustPlugin plugin)
{
    Puts("OnPluginUnloaded was called!");
}

Last updated