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
- Extension Methods
Properties
AreaSelectionMode
Block selection mode
bool AreaSelectionMode { get; set; }
Property Value
CurrentGameMode
The players current game mode. Will return Spectator mode while the player is connecting.
EnumGameMode CurrentGameMode { get; set; }
Property Value
Deaths
int Deaths { get; }
Property Value
DesiredViewDistance
The players desired viewing distance in blocks
int DesiredViewDistance { get; set; }
Property Value
EntityControls
The controls that moves around the EntityPlayer
EntityControls EntityControls { get; }
Property Value
EntityPlayer
The player entity this player is currently controlling
EntityPlayer EntityPlayer { get; }
Property Value
FreeMove
Whether the player can freely fly around
bool FreeMove { get; set; }
Property Value
FreeMovePlaneLock
Whether the player is forcefully kept on vertical or horizontal plane during freemove
EnumFreeMovAxisLock FreeMovePlaneLock { get; set; }
Property Value
LastApprovedViewDistance
The players viewing distance in blocks that is allowed by the server
int LastApprovedViewDistance { get; set; }
Property Value
MoveSpeedMultiplier
The players movement speed
float MoveSpeedMultiplier { get; set; }
Property Value
NoClip
Affected by collision boxes or not
bool NoClip { get; set; }
Property Value
PickingRange
Range of selectable blox
float PickingRange { get; set; }
Property Value
PlayerUID
The players unique identifier
string PlayerUID { get; }
Property Value
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)