Table of Contents

Interface IWorldPlayerData

Namespace
Vintagestory.API.Common
Assembly
VintagestoryAPI.dll

Some world-specific information about a connected player. If you want modify any value, also broadcast the playerdata to all connected clients. This is the object that stored and loaded with the save game

public interface IWorldPlayerData

Properties

AreaSelectionMode

Block selection mode

bool AreaSelectionMode { get; set; }

Property Value

bool

CurrentGameMode

The players current game mode. Will return Spectator mode while the player is connecting.

EnumGameMode CurrentGameMode { get; set; }

Property Value

EnumGameMode

Deaths

int Deaths { get; }

Property Value

int

DesiredViewDistance

The players desired viewing distance in blocks

int DesiredViewDistance { get; set; }

Property Value

int

EntityControls

The controls that moves around the EntityPlayer

EntityControls EntityControls { get; }

Property Value

EntityControls

EntityPlayer

The player entity this player is currently controlling

EntityPlayer EntityPlayer { get; }

Property Value

EntityPlayer

FreeMove

Whether the player can freely fly around

bool FreeMove { get; set; }

Property Value

bool

FreeMovePlaneLock

Whether the player is forcefully kept on vertical or horizontal plane during freemove

EnumFreeMovAxisLock FreeMovePlaneLock { get; set; }

Property Value

EnumFreeMovAxisLock

LastApprovedViewDistance

The players viewing distance in blocks that is allowed by the server

int LastApprovedViewDistance { get; set; }

Property Value

int

MoveSpeedMultiplier

The players movement speed

float MoveSpeedMultiplier { get; set; }

Property Value

float

NoClip

Affected by collision boxes or not

bool NoClip { get; set; }

Property Value

bool

PickingRange

Range of selectable blox

float PickingRange { get; set; }

Property Value

float

PlayerUID

The players unique identifier

string PlayerUID { get; }

Property Value

string

Methods

GetModdata(string)

Retrieve arbitrary, permantly stored mod data

byte[] GetModdata(string key)

Parameters

key string

Returns

byte[]

RemoveModdata(string)

Removes the permanently stored mod data

void RemoveModdata(string key)

Parameters

key string

SetModdata(string, byte[])

Allows setting of arbitrary, permanantly stored moddata attached to this player. Not synced to client.

void SetModdata(string key, byte[] data)

Parameters

key string
data byte[]