跳到主要内容
版本:Next

Interface IServerEvents

Namespace: ReadyM.SDK.Server.Events
Assembly: ReadyM.SDK.Server.dll

The server's events: players connecting and moving, and areas and cells coming and going.

public interface IServerEvents

OnAreaCreated​

Fires when an area comes into use, as the first player enters it.

event Action<Area>? OnAreaCreated

Event Type​

Action<Area>?

OnAreaDeleted​

Fires when the last player has left an area, unless the server keeps it while empty.

event Action<Area>? OnAreaDeleted

Event Type​

Action<Area>?

OnCellCreated​

Fires when a cell comes into use, as the first player loads it.

event Action<Cell>? OnCellCreated

Event Type​

Action<Cell>?

OnCellDeleted​

Fires when the last player has unloaded a cell, unless the server keeps it while empty.

event Action<Cell>? OnCellDeleted

Event Type​

Action<Cell>?

OnPlayerActivatedCell​

Fires when any player loads a cell, the first one included.

event Action<PlayerId, FullCellId>? OnPlayerActivatedCell

Event Type​

Action<PlayerId, FullCellId>?

OnPlayerConnected​

Fires when a player has connected and their player entity exists, with their ReadyM id.

event Action<Player, Guid>? OnPlayerConnected

Event Type​

Action<Player, Guid>?

OnPlayerDeactivatedCell​

Fires when any player unloads a cell.

event Action<PlayerId, FullCellId>? OnPlayerDeactivatedCell

Event Type​

Action<PlayerId, FullCellId>?

OnPlayerDisconnected​

Fires when a player has left or dropped, after they left their area.

event Action<Player, Guid, DisconnectReason?>? OnPlayerDisconnected

Event Type​

Action<Player, Guid, DisconnectReason?>?

OnPlayerJoinedArea​

Fires when any player enters an area, the first one included.

event Action<PlayerId, AreaId>? OnPlayerJoinedArea

Event Type​

Action<PlayerId, AreaId>?

OnPlayerLeftArea​

Fires when any player leaves an area.

event Action<PlayerId, AreaId>? OnPlayerLeftArea

Event Type​

Action<PlayerId, AreaId>?

OnWorldCreated​

Raised once, when the world entity exists. A mod's Init runs before that, so this is the earliest point at which world values can be written.

event Action<World>? OnWorldCreated

Event Type​

Action<World>?

  • OnAreaCreated
  • OnAreaDeleted
  • OnCellCreated
  • OnCellDeleted
  • OnPlayerActivatedCell
  • OnPlayerConnected
  • OnPlayerDeactivatedCell
  • OnPlayerDisconnected
  • OnPlayerJoinedArea
  • OnPlayerLeftArea
  • OnWorldCreated