Table of Contents

Interface IPlayerDataManager

Namespace
Vintagestory.API.Server
Assembly
VintagestoryAPI.dll
public interface IPlayerDataManager

Properties

PlayerDataByUid

Returns a copy of the player data dictionary loaded by the server. Thats the contents of Playerdata/playerdata.json

Dictionary<string, IServerPlayerData> PlayerDataByUid { get; }

Property Value

Dictionary<string, IServerPlayerData>

Methods

GetPlayerDataByLastKnownName(string)

Retrieve a players offline, world-agnostic data by his last known name

IServerPlayerData GetPlayerDataByLastKnownName(string name)

Parameters

name string

Returns

IServerPlayerData

GetPlayerDataByUid(string)

Retrieve a players offline, world-agnostic data by player uid

IServerPlayerData GetPlayerDataByUid(string playerUid)

Parameters

playerUid string

Returns

IServerPlayerData

ResolvePlayerName(string, Action<EnumServerResponse, string>)

Resolves a player name to a player uid, independent on whether this player is online, offline or never even joined the server. This is done by contacting the auth server, so please use this method sparingly.

void ResolvePlayerName(string playername, Action<EnumServerResponse, string> onPlayerReceived)

Parameters

playername string
onPlayerReceived Action<EnumServerResponse, string>

ResolvePlayerUid(string, Action<EnumServerResponse, string>)

Resolves a player uid to a player name, independent on whether this player is online, offline or never even joined the server. This is done by contacting the auth server, so please use this method sparingly.

void ResolvePlayerUid(string playeruid, Action<EnumServerResponse, string> onPlayerReceived)

Parameters

playeruid string
onPlayerReceived Action<EnumServerResponse, string>