diff options
author | satoshinm <snmatsutake@yahoo.co.jp> | 2017-08-27 23:10:20 +0200 |
---|---|---|
committer | Mattes D <github@xoft.cz> | 2017-08-27 23:10:20 +0200 |
commit | 6bc503151746ea05842009983c7de932fa80cd03 (patch) | |
tree | a7ce87c25b2acb9c5f76cd1a25180b77ebf16f26 /src/Server.h | |
parent | Implement anvil chunk sparsing (diff) | |
download | cuberite-6bc503151746ea05842009983c7de932fa80cd03.tar cuberite-6bc503151746ea05842009983c7de932fa80cd03.tar.gz cuberite-6bc503151746ea05842009983c7de932fa80cd03.tar.bz2 cuberite-6bc503151746ea05842009983c7de932fa80cd03.tar.lz cuberite-6bc503151746ea05842009983c7de932fa80cd03.tar.xz cuberite-6bc503151746ea05842009983c7de932fa80cd03.tar.zst cuberite-6bc503151746ea05842009983c7de932fa80cd03.zip |
Diffstat (limited to 'src/Server.h')
-rw-r--r-- | src/Server.h | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/src/Server.h b/src/Server.h index 633f6de70..ffdee64d9 100644 --- a/src/Server.h +++ b/src/Server.h @@ -71,6 +71,16 @@ public: size_t GetNumPlayers(void) const { return m_PlayerCount; } void SetMaxPlayers(size_t a_MaxPlayers) { m_MaxPlayers = a_MaxPlayers; } + // tolua_end + + /** Add a Forge mod to the server ping list. */ + bool RegisterForgeMod(const AString & a_ModName, const AString & a_ModVersion, UInt32 a_ProtocolVersionNumber); + + // tolua_begin + + /** Remove a Forge mod to the server ping list. */ + void UnregisterForgeMod(const AString & a_ModName, UInt32 a_ProtocolVersionNumber); + /** Check if the player is queued to be transferred to a World. Returns true is Player is found in queue. */ bool IsPlayerInQueue(AString a_Username); @@ -145,6 +155,9 @@ public: from the settings. */ bool ShouldAllowMultiWorldTabCompletion(void) const { return m_ShouldAllowMultiWorldTabCompletion; } + /** Get the Forge mods (map of ModName -> ModVersionString) registered for a given protocol. */ + const AStringMap & GetRegisteredForgeMods(const UInt32 a_Protocol); + private: friend class cRoot; // so cRoot can create and destroy cServer @@ -202,6 +215,9 @@ private: size_t m_MaxPlayers; bool m_bIsHardcore; + /** Map of protocol version to Forge mods (map of ModName -> ModVersionString) */ + std::map<UInt32, AStringMap> m_ForgeModsByVersion; + /** True - allow same username to login more than once False - only once */ bool m_bAllowMultiLogin; @@ -241,6 +257,9 @@ private: cServer(void); + /** Get the Forge mods registered for a given protocol, for modification */ + AStringMap & RegisteredForgeMods(const UInt32 a_Protocol); + /** Loads, or generates, if missing, RSA keys for protocol encryption */ void PrepareKeys(void); |