Table of Contents

Events

Below all the events possible

Event Payload type When it fires Subscribe via
OnServerStarted EventHandler? (no payload) Server has started SubscribeServerStartedAsync()
OnServerStopping EventHandler? (no payload) Server is stopping SubscribeServerStoppingAsync()
OnServerSaving EventHandler? (no payload) Server is saving SubscribeServerSavingAsync()
OnServerSaved EventHandler? (no payload) Server finished saving the world SubscribeServerSavedAsync()
OnPlayerJoined EventHandler<Player> A player joined the server SubscribePlayerJoinedAsync(Player[]? players = null) (null = all players)
OnPlayerLeft EventHandler<Player> A player left the server SubscribePlayerLeftAsync(Player[]? players = null) (null = all players)
OnOperatorAdded EventHandler<Operator> A player was opped SubscribeOperatorsAddedAsync()
OnOperatorRemoved EventHandler<Operator> A player was de-opped SubscribeOperatorsRemovedAsync()
OnAllowlistAdded EventHandler<Player> Player added to allowlist SubscribeAllowlistAddedAsync()
OnAllowlistRemoved EventHandler<Player> Player removed from allowlist SubscribeAllowlistRemovedAsync()
OnIpBanAdded EventHandler<IpBan> An IP was banned SubscribeIpBansAddedAsync()
OnIpBanRemoved EventHandler<string> An IP was unbanned (payload is IP string) SubscribeIpBansRemovedAsync()
OnUserBanAdded EventHandler<UserBan> A user was banned SubscribeBansAddedAsync()
OnUserBanRemoved EventHandler<Player> A user was unbanned SubscribeBansRemovedAsync()
OnGameruleUpdated EventHandler<TypedGameRule> A gamerule was updated SubscribeGamerulesUpdatedAsync()
OnServerStatus EventHandler<ServerState> A heartbeat/status was received SubscribeServerStatusAsync()