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.

OnCompilationFail

  • Gets called when a plugin fails compiling.

  • No return behavior.

  • This hook is Carbon-only compatible.

  • Patches ScriptLoader.Compile of Carbon.dll.

Example
void OnCompilationFail(string String , Carbon.Core.ModLoader.CompilationResult CompilationResult )
{
    Puts("OnCompilationFail was called!");
}

OnConstructorFail

  • Gets called when a plugin's constructor throws an exception.

  • Fatal error which forcefully unloads the plugin right after.

  • No return behavior.

  • This hook is Carbon-only compatible.

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

Example
void OnConstructorFail(Oxide.Plugins.RustPlugin RustPlugin , System.Exception Exception )
{
    Puts("OnConstructorFail was called!");
}

OnPluginLoaded

  • Gets called when a plugin is loaded.

  • No return behavior.

  • This hook is Carbon-only compatible.

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

OnPluginUnloaded

  • Gets called when a plugin is unloaded.

  • No return behavior.

  • This hook is Carbon-only compatible.

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

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

Last updated