For the complete documentation index, see llms.txt. This page is also available as Markdown.

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.

Last updated