PlayerSnapshot
Namespace Mc.Scripting · Kind struct (readonly)
public readonly struct PlayerSnapshot : IEquatable<PlayerSnapshot>One online player as the engine reports him (see Server.PlayersSnapshot).
Constructors
Section titled “Constructors”| Member | Description |
|---|---|
Constructor |
One online player as the engine reports him (see Server.PlayersSnapshot). |
Constructor
Section titled “Constructor”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. |
Properties
Section titled “Properties”| 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). |
AllowsListing
Section titled “AllowsListing”public bool AllowsListing { get; init; }Whether he allows being listed (the server list setting of his client).
EntityId
Section titled “EntityId”public ulong EntityId { get; init; }The entity handle; PlayerSnapshot.Player wraps it.
GameMode
Section titled “GameMode”public int GameMode { get; init; }The game mode, 0 survival, 1 creative, 2 adventure, 3 spectator.
HasDisplayName
Section titled “HasDisplayName”public bool HasDisplayName { get; init; }Whether he has a display name in the tab list.
Listed
Section titled “Listed”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.
Player
Section titled “Player”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).