Interface IGameHostInformation
Provides information about the current game.
Namespace: OpenMod.Extensions.Games.Abstractions
Assembly: OpenMod.Extensions.Games.Abstractions.dll
Syntax
public interface IGameHostInformation : IHostInformation
Properties
| Improve this Doc View SourceGameDisplayName
Gets the name of the game.
Declaration
string GameDisplayName { get; }
Property Value
Type | Description |
---|---|
System.String |
GameVersion
Gets the version of the running game.
Declaration
string GameVersion { get; }
Property Value
Type | Description |
---|---|
System.String |
IsClient
Checks if the current host is a client.
Declaration
bool IsClient { get; }
Property Value
Type | Description |
---|---|
System.Boolean |
Remarks
A host can be both server and client at the same time.
IsServer
Checks if the current host is a server.
Declaration
bool IsServer { get; }
Property Value
Type | Description |
---|---|
System.Boolean |
Remarks
A host can be both server and client at the same time.
ServerAddress
Gets the address used to connect to the server. Null if the current host is not a server or is not listening yet.
Declaration
IPAddress? ServerAddress { get; }
Property Value
Type | Description |
---|---|
System.Nullable<IPAddress> |
ServerInstance
Gets the current server instance for games that support multiple server instances per installation. Returns default for games that do not support multiple instances. Returns null if the host is not a server.
Declaration
string ServerInstance { get; }
Property Value
Type | Description |
---|---|
System.String |
ServerName
Gets the name of the server. Returns null if the host is not a server.
Declaration
string? ServerName { get; }
Property Value
Type | Description |
---|---|
System.Nullable<System.String> |
ServerPort
Gets the port used to connect to the server. Null if the current host is not a server or is not listening yet.
Declaration
ushort? ServerPort { get; }
Property Value
Type | Description |
---|---|
System.Nullable<System.UInt16> |