tModLoader v2024.09
A mod to make and play Terraria mods
PlayerFileData Class Reference

Inherits FileData.

Public Member Functions

 PlayerFileData (string path, bool cloudSave)
 
TimeSpan GetPlayTime ()
 
void MarkAsServerSide ()
 
override void MoveToCloud ()
 
override void MoveToLocal ()
 
void PausePlayTimer ()
 
void Rename (string newName)
 
override void SetAsActive ()
 
void SetPlayTime (TimeSpan time)
 
void StartPlayTimer ()
 
void StopPlayTimer ()
 
void UpdatePlayTimer ()
 
void UpdatePlayTimerAndKeepState ()
 
- Public Member Functions inherited from FileData
string GetFileName (bool includeExtension=true)
 
abstract void MoveToCloud ()
 
abstract void MoveToLocal ()
 
abstract void SetAsActive ()
 
void SetFavorite (bool favorite, bool saveChanges=true)
 
void ToggleFavorite ()
 

Static Public Member Functions

static PlayerFileData CreateAndSave (Player player)
 

Public Attributes

CustomModDataException customDataFail = null
 
- Public Attributes inherited from FileData
FileMetadata Metadata
 
string Name
 
readonly string Type
 

Properties

Player Player [get, set]
 
bool ServerSideCharacter [get]
 
- Properties inherited from FileData
bool IsCloudSave [get]
 
bool IsFavorite [get]
 
string Path [get]
 

Additional Inherited Members

- Protected Member Functions inherited from FileData
 FileData (string type)
 
 FileData (string type, string path, bool isCloud)
 
- Protected Attributes inherited from FileData
bool _isCloudSave
 
bool _isFavorite
 
string _path
 

Member Function Documentation

◆ MoveToCloud()

override void PlayerFileData.MoveToCloud ( )
virtual

Implements FileData.

◆ MoveToLocal()

override void PlayerFileData.MoveToLocal ( )
virtual

Implements FileData.

◆ SetAsActive()

override void PlayerFileData.SetAsActive ( )
virtual

Implements FileData.