summaryrefslogtreecommitdiffstats
path: root/src/Entities/Player.h
diff options
context:
space:
mode:
authorTiger Wang <ziwei.tiger@hotmail.co.uk>2014-06-04 19:59:56 +0200
committerTiger Wang <ziwei.tiger@hotmail.co.uk>2014-06-04 19:59:56 +0200
commit74cd4f552152f73d0d46cf726bcef472841e2da5 (patch)
tree9f5f4e9a856ede137d1668497a2612bad1433150 /src/Entities/Player.h
parentRemoved use of auto (diff)
downloadcuberite-74cd4f552152f73d0d46cf726bcef472841e2da5.tar
cuberite-74cd4f552152f73d0d46cf726bcef472841e2da5.tar.gz
cuberite-74cd4f552152f73d0d46cf726bcef472841e2da5.tar.bz2
cuberite-74cd4f552152f73d0d46cf726bcef472841e2da5.tar.lz
cuberite-74cd4f552152f73d0d46cf726bcef472841e2da5.tar.xz
cuberite-74cd4f552152f73d0d46cf726bcef472841e2da5.tar.zst
cuberite-74cd4f552152f73d0d46cf726bcef472841e2da5.zip
Diffstat (limited to '')
-rw-r--r--src/Entities/Player.h12
1 files changed, 8 insertions, 4 deletions
diff --git a/src/Entities/Player.h b/src/Entities/Player.h
index 5c0b61064..39031fbfb 100644
--- a/src/Entities/Player.h
+++ b/src/Entities/Player.h
@@ -127,7 +127,7 @@ public:
inline const cItem & GetEquippedItem(void) const { return GetInventory().GetEquippedItem(); } // tolua_export
- /** Returns whether the player is climbing (ladders, vines e.t.c). */
+ /** Returns whether the player is climbing (ladders, vines etc.) */
bool IsClimbing(void) const;
virtual void TeleportToCoords(double a_PosX, double a_PosY, double a_PosZ) override;
@@ -330,8 +330,13 @@ public:
virtual bool MoveToWorld(const AString & a_WorldName, cWorld * a_World = NULL) override; // tolua_export
+ /** Saves all player data, such as inventory, to JSON */
bool SaveToDisk(void);
- bool LoadFromDisk(cWorld * a_World);
+
+ /** Loads player data from JSON to the object
+ Takes a (NULL) cWorld pointer which it will assign a value to based on either the loaded world or default world
+ */
+ bool LoadFromDisk(cWorld *& a_World);
void LoadPermissionsFromDisk(void); // tolua_export
const AString & GetLoadedWorldName() { return m_LoadedWorldName; }
@@ -342,8 +347,7 @@ public:
void SendExperience(void);
- // In UI windows, the item that the player is dragging:
- bool IsDraggingItem(void) const { return !m_DraggingItem.IsEmpty(); }
+ /** In UI windows, the item that the player is dragging */
cItem & GetDraggingItem(void) {return m_DraggingItem; }
// In UI windows, when inventory-painting: