From 4aef80b47eb6941d7fc41e57efe147af0ece1f9b Mon Sep 17 00:00:00 2001 From: Mattes D Date: Fri, 3 Jan 2020 17:31:13 +0100 Subject: Added temporary block type mapping for 1.13+ protocols. --- src/Protocol/Protocol.h | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'src/Protocol/Protocol.h') diff --git a/src/Protocol/Protocol.h b/src/Protocol/Protocol.h index 8707c3326..c71b295ad 100644 --- a/src/Protocol/Protocol.h +++ b/src/Protocol/Protocol.h @@ -57,6 +57,11 @@ public: virtual ~cProtocol() {} + /** Called after construction so that the protocol class can initialize itself. + Throws a std::exception descendant on failure; the client is kicked + with the exception's message as a result. */ + virtual void Initialize(cClientHandle & a_Client) {} + /** Logical types of outgoing packets. These values get translated to on-wire packet IDs in GetPacketID(), specific for each protocol. This is mainly useful for protocol sub-versions that re-number the packets while using mostly the same packet layout. */ -- cgit v1.2.3