OpenMod Docs OpenMod Docs
OpenMod Docs OpenMod Docs
OpenMod .NET Plugin Framework.

Interface IGameHostInformation

Provides information about the current game.

Inherited Members
IHostInformation.HostVersion
IHostInformation.HostName
Namespace: OpenMod.Extensions.Games.Abstractions
Assembly: OpenMod.Extensions.Games.Abstractions.dll
Syntax
public interface IGameHostInformation : IHostInformation

Properties

| Improve this Doc View Source

GameDisplayName

Gets the name of the game.

Declaration
string GameDisplayName { get; }
Property Value
Type Description
System.String
| Improve this Doc View Source

GameVersion

Gets the version of the running game.

Declaration
string GameVersion { get; }
Property Value
Type Description
System.String
| Improve this Doc View Source

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.

| Improve this Doc View Source

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.

| Improve this Doc View Source

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>
| Improve this Doc View Source

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
| Improve this Doc View Source

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>
| Improve this Doc View Source

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>

Extension Methods

DisposeHelper.DisposeSyncOrAsync(Object)