API reference Obsidian.API.Client
IClientConnection interface
The client's connection to a server, which a mod sends its payloads on.
public interface IClientConnection
In Obsidian.API.Client.
Properties
Phase
PayloadPhase? Phase { get; }The phase the connection is in: PayloadPhase.Configuration or PayloadPhase.Play, or null while the client isn't connected (or is still logging in).
World
IClientWorld World { get; }The client's read-only world view while playing, or null during login, configuration and disconnection. Obtain it again after changing servers; see IClientWorld for thread rules.
Methods
SendPayload<TPayload>(TPayload)
bool SendPayload<TPayload>(TPayload payload) where TPayload : ICustomPayload<TPayload>;Sends a payload to the server, if the server agreed on its channel (in NeoForge's handshake, or by registering it) and the mod declared the channel with IPluginRegistry.MapPayload for the current phase.
Returns
Whether the payload was sent.