Skip to content

PlayerSnapshot

Namespace Mc.Scripting · Kind struct (readonly)

public readonly struct PlayerSnapshot : IEquatable<PlayerSnapshot>

One online player as the engine reports him (see Server.PlayersSnapshot).

Member Description
Constructor One online player as the engine reports him (see Server.PlayersSnapshot).
public PlayerSnapshot(ulong EntityId, Guid Uuid, int World, int GameMode, int Ping, bool Listed, bool AllowsListing, bool HasDisplayName, string Name)

One online player as the engine reports him (see Server.PlayersSnapshot).

Parameters

Name Type Description
EntityId ulong The entity handle; PlayerSnapshot.Player wraps it.
Uuid Guid The profile id.
World int The index of his dimension, -1 when unknown (see Server.Worlds).
GameMode int The game mode, 0 survival, 1 creative, 2 adventure, 3 spectator.
Ping int The latency in milliseconds.
Listed bool Whether he is listed in the tab list.
AllowsListing bool Whether he allows being listed (the server list setting of his client).
HasDisplayName bool Whether he has a display name in the tab list.
Name string His name.
Member Description
bool AllowsListing { get; init; } Whether he allows being listed (the server list setting of his client).
ulong EntityId { get; init; } The entity handle; PlayerSnapshot.Player wraps it.
int GameMode { get; init; } The game mode, 0 survival, 1 creative, 2 adventure, 3 spectator.
bool HasDisplayName { get; init; } Whether he has a display name in the tab list.
bool Listed { get; init; } Whether he is listed in the tab list.
string Name { get; init; } His name.
int Ping { get; init; } The latency in milliseconds.
Player Player { get; } The player handle (valid while he is online).
Guid Uuid { get; init; } The profile id.
int World { get; init; } The index of his dimension, -1 when unknown (see Server.Worlds).
public bool AllowsListing { get; init; }

Whether he allows being listed (the server list setting of his client).

public ulong EntityId { get; init; }

The entity handle; PlayerSnapshot.Player wraps it.

public int GameMode { get; init; }

The game mode, 0 survival, 1 creative, 2 adventure, 3 spectator.

public bool HasDisplayName { get; init; }

Whether he has a display name in the tab list.

public bool Listed { get; init; }

Whether he is listed in the tab list.

public string Name { get; init; }

His name.

public int Ping { get; init; }

The latency in milliseconds.

public Player Player { get; }

The player handle (valid while he is online).

public Guid Uuid { get; init; }

The profile id.

public int World { get; init; }

The index of his dimension, -1 when unknown (see Server.Worlds).

GameMode · Player · Uuid · World