summaryrefslogtreecommitdiffstats
path: root/src/ClientHandle.h
diff options
context:
space:
mode:
authorMattes D <github@xoft.cz>2014-10-05 20:19:21 +0200
committerMattes D <github@xoft.cz>2014-10-05 20:19:21 +0200
commita8aeceab9d6e5e5e36ef7bd58783b65aca4d8be7 (patch)
treeae3a23a0691b741c7b369f84a1de96126bf73aa6 /src/ClientHandle.h
parentUpdate README.md (diff)
downloadcuberite-a8aeceab9d6e5e5e36ef7bd58783b65aca4d8be7.tar
cuberite-a8aeceab9d6e5e5e36ef7bd58783b65aca4d8be7.tar.gz
cuberite-a8aeceab9d6e5e5e36ef7bd58783b65aca4d8be7.tar.bz2
cuberite-a8aeceab9d6e5e5e36ef7bd58783b65aca4d8be7.tar.lz
cuberite-a8aeceab9d6e5e5e36ef7bd58783b65aca4d8be7.tar.xz
cuberite-a8aeceab9d6e5e5e36ef7bd58783b65aca4d8be7.tar.zst
cuberite-a8aeceab9d6e5e5e36ef7bd58783b65aca4d8be7.zip
Diffstat (limited to 'src/ClientHandle.h')
-rw-r--r--src/ClientHandle.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/ClientHandle.h b/src/ClientHandle.h
index 20592c190..a9cc29d50 100644
--- a/src/ClientHandle.h
+++ b/src/ClientHandle.h
@@ -316,6 +316,12 @@ public:
/** Called when the player will enchant a Item */
void HandleEnchantItem(Byte & a_WindowID, Byte & a_Enchantment);
+
+ /** Called by the protocol recognizer when the protocol version is known. */
+ void SetProtocolVersion(UInt32 a_ProtocolVersion) { m_ProtocolVersion = a_ProtocolVersion; }
+
+ /** Returns the protocol version number of the protocol that the client is talking. Returns zero if the protocol version is not (yet) known. */
+ UInt32 GetProtocolVersion(void) const { return m_ProtocolVersion; } // tolua_export
private:
@@ -427,6 +433,9 @@ private:
/** The brand identification of the client, as received in the MC|Brand plugin message or set from a plugin. */
AString m_ClientBrand;
+ /** The version of the protocol that the client is talking, or 0 if unknown. */
+ UInt32 m_ProtocolVersion;
+
/** Handles the block placing packet when it is a real block placement (not block-using, item-using or eating) */
void HandlePlaceBlock(int a_BlockX, int a_BlockY, int a_BlockZ, eBlockFace a_BlockFace, int a_CursorX, int a_CursorY, int a_CursorZ, cItemHandler & a_ItemHandler);