Schedule Dedicated Servers Documentation
  • SDS Documentation
  • Schedule In Unity
    • Extracting the game to unity
    • Creating an assetbundle
  • Creating plugins
    • How to create a plugin
    • The ClientAPI (custom content)
  • Custom Assets
  • Plugin Events
  • Texture/Material Replacement
  • Chat Messages
  • Chat Commands
  • Console Commands
  • HAPI Methods
Powered by GitBook
On this page

Plugin Events

Plugins can override event methods so they can be notified when specific things happens. For now there's only 3 events but more can be added upon request.

This event will be triggered when the game has finished loading the world/save.

void OnWorldLoaded()
public override void OnWorldLoaded()
{
    Log("The world has loaded!");
}

This event will be triggered when a player connects to the server.

void OnPlayerConnected(Player player)
public override void OnPlayerConnected(Player player)
{
    Log($"{player.PlayerName} has joined the game!");
    player.SendChatMessage($"Welcome to the server {player.PlayerName}.");
}

This event will be triggered when a player disconnects from the server.

void OnPlayerDisconnected(Player player)
public override void OnPlayerDisconnected(Player player)
{
    Log($"{player.PlayerName} has left the game!");
}

Want more events ? DM me on discord with the events you'd like and i can take a look at adding it.

PreviousCustom AssetsNextTexture/Material Replacement

Last updated 1 month ago