summaryrefslogtreecommitdiffstats
path: root/src/ClientHandle.h
diff options
context:
space:
mode:
authorMattes D <github@xoft.cz>2014-08-01 22:35:12 +0200
committerMattes D <github@xoft.cz>2014-08-01 22:35:12 +0200
commit941a182d8a8a210bb6400cc6b2750a06b5f6c038 (patch)
tree82dfee0f38536020345a820c84ff2c4f01c3213b /src/ClientHandle.h
parentMerge pull request #1273 from Howaner/GlobalFixes (diff)
parentMerged branch 'master' into NameToUUID. (diff)
downloadcuberite-941a182d8a8a210bb6400cc6b2750a06b5f6c038.tar
cuberite-941a182d8a8a210bb6400cc6b2750a06b5f6c038.tar.gz
cuberite-941a182d8a8a210bb6400cc6b2750a06b5f6c038.tar.bz2
cuberite-941a182d8a8a210bb6400cc6b2750a06b5f6c038.tar.lz
cuberite-941a182d8a8a210bb6400cc6b2750a06b5f6c038.tar.xz
cuberite-941a182d8a8a210bb6400cc6b2750a06b5f6c038.tar.zst
cuberite-941a182d8a8a210bb6400cc6b2750a06b5f6c038.zip
Diffstat (limited to 'src/ClientHandle.h')
-rw-r--r--src/ClientHandle.h8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/ClientHandle.h b/src/ClientHandle.h
index f3f1da417..ee1db3155 100644
--- a/src/ClientHandle.h
+++ b/src/ClientHandle.h
@@ -66,7 +66,9 @@ public:
cPlayer * GetPlayer(void) { return m_Player; } // tolua_export
+ /** Returns the player's UUID, as used by the protocol, in the short form (no dashes) */
const AString & GetUUID(void) const { return m_UUID; } // tolua_export
+
void SetUUID(const AString & a_UUID) { m_UUID = a_UUID; }
const Json::Value & GetProperties(void) const { return m_Properties; }
@@ -80,7 +82,7 @@ public:
/** Generates an UUID based on the player name provided.
This is used for the offline (non-auth) mode, when there's no UUID source.
Each username generates a unique and constant UUID, so that when the player reconnects with the same name, their UUID is the same.
- Returns a 36-char UUID (with dashes). */
+ Returns a 32-char UUID (no dashes). */
static AString GenerateOfflineUUID(const AString & a_Username); // tolua_export
/** Returns true if the UUID is generated by online auth, false if it is an offline-generated UUID.
@@ -360,7 +362,11 @@ private:
int m_NumBlockChangeInteractionsThisTick;
static int s_ClientCount;
+
+ /** ID used for identification during authenticating. Assigned sequentially for each new instance. */
int m_UniqueID;
+
+ /** Contains the UUID used by Mojang to identify the player's account. Short UUID stored here (without dashes) */
AString m_UUID;
/** Set to true when the chunk where the player is is sent to the client. Used for spawning the player */