diff options
author | Tiger Wang <ziwei.tiger@outlook.com> | 2021-03-28 23:34:54 +0200 |
---|---|---|
committer | Tiger Wang <ziwei.tiger@outlook.com> | 2021-03-30 00:36:15 +0200 |
commit | 8a30a4a7b8a7ebbdbccb6995fd2f5c0f8011bace (patch) | |
tree | 53f66b6f7ae85b56612aa0f1980a8adb5f29d008 /src/Entities/Player.h | |
parent | cIsThread cleanup (diff) | |
download | cuberite-8a30a4a7b8a7ebbdbccb6995fd2f5c0f8011bace.tar cuberite-8a30a4a7b8a7ebbdbccb6995fd2f5c0f8011bace.tar.gz cuberite-8a30a4a7b8a7ebbdbccb6995fd2f5c0f8011bace.tar.bz2 cuberite-8a30a4a7b8a7ebbdbccb6995fd2f5c0f8011bace.tar.lz cuberite-8a30a4a7b8a7ebbdbccb6995fd2f5c0f8011bace.tar.xz cuberite-8a30a4a7b8a7ebbdbccb6995fd2f5c0f8011bace.tar.zst cuberite-8a30a4a7b8a7ebbdbccb6995fd2f5c0f8011bace.zip |
Diffstat (limited to '')
-rw-r--r-- | src/Entities/Player.h | 26 |
1 files changed, 9 insertions, 17 deletions
diff --git a/src/Entities/Player.h b/src/Entities/Player.h index 2d31ef84b..4d6a41a35 100644 --- a/src/Entities/Player.h +++ b/src/Entities/Player.h @@ -379,21 +379,18 @@ public: void SetVisible( bool a_bVisible); // tolua_export bool IsVisible(void) const { return m_bVisible; } // tolua_export - /** Saves all player data, such as inventory, to JSON */ - bool SaveToDisk(void); + /** Saves all player data, such as inventory, to JSON. */ + void SaveToDisk(void); typedef cWorld * cWorldPtr; - /** Loads the player data from the disk file - Sets a_World to the world where the player will spawn, based on the stored world name or the default world by calling LoadFromFile() - Returns true on success, false on failure - */ - bool LoadFromDisk(cWorldPtr & a_World); + /** Loads the player data from the disk file. + Sets a_World to the world where the player will spawn, based on the stored world name or the default world by calling LoadFromFile(). */ + void LoadFromDisk(cWorldPtr & a_World); - /** Loads the player data from the specified file - Sets a_World to the world where the player will spawn, based on the stored world name or the default world - Returns true on success, false on failure - */ + /** Loads the player data from the specified file. + Sets a_World to the world where the player will spawn, based on the stored world name or the default world. + Returns true on success, false if the player wasn't found, and excepts with base std::runtime_error if the data couldn't be read or parsed. */ bool LoadFromFile(const AString & a_FileName, cWorldPtr & a_World); const AString & GetLoadedWorldName() const { return m_CurrentWorldName; } @@ -499,7 +496,7 @@ public: bool DoesPlacingBlocksIntersectEntity(const sSetBlockVector & a_Blocks); /** Returns the UUID that has been read from the client, or nil if not available. */ - const cUUID & GetUUID(void) const { return m_UUID; } // Exported in ManualBindings.cpp + const cUUID & GetUUID(void) const; // Exported in ManualBindings.cpp // tolua_begin @@ -507,7 +504,6 @@ public: virtual bool CanFly(void) const { return m_CanFly; } /** (Re)loads the rank and permissions from the cRankManager. - Expects the m_UUID member to be valid. Loads the m_Rank, m_Permissions, m_MsgPrefix, m_MsgSuffix and m_MsgNameColorCode members. */ void LoadRank(void); @@ -718,10 +714,6 @@ private: */ bool m_bIsTeleporting; - /** The UUID of the player, as read from the ClientHandle. - If no ClientHandle is given, the UUID is nil. */ - cUUID m_UUID; - AString m_CustomName; /** Displayed skin part bit mask */ |