summaryrefslogtreecommitdiffstats
path: root/src/Root.h
diff options
context:
space:
mode:
authorTiger Wang <ziwei.tiger@hotmail.co.uk>2014-12-13 13:11:01 +0100
committerTiger Wang <ziwei.tiger@hotmail.co.uk>2014-12-13 13:11:01 +0100
commit4b20a615192baeb5ef0a04a10161a03428cda8cd (patch)
treec6f25102267b0cc4a444f6e746679405948142b0 /src/Root.h
parentFixed compilation? (diff)
parentMerge pull request #1660 from Seadragon91/master (diff)
downloadcuberite-4b20a615192baeb5ef0a04a10161a03428cda8cd.tar
cuberite-4b20a615192baeb5ef0a04a10161a03428cda8cd.tar.gz
cuberite-4b20a615192baeb5ef0a04a10161a03428cda8cd.tar.bz2
cuberite-4b20a615192baeb5ef0a04a10161a03428cda8cd.tar.lz
cuberite-4b20a615192baeb5ef0a04a10161a03428cda8cd.tar.xz
cuberite-4b20a615192baeb5ef0a04a10161a03428cda8cd.tar.zst
cuberite-4b20a615192baeb5ef0a04a10161a03428cda8cd.zip
Diffstat (limited to 'src/Root.h')
-rw-r--r--src/Root.h19
1 files changed, 14 insertions, 5 deletions
diff --git a/src/Root.h b/src/Root.h
index 020a6cff0..2c512a5df 100644
--- a/src/Root.h
+++ b/src/Root.h
@@ -6,6 +6,7 @@
#include "HTTPServer/HTTPServer.h"
#include "Defines.h"
#include "RankManager.h"
+#include <thread>
@@ -86,7 +87,7 @@ public:
cPluginManager * GetPluginManager (void) { return m_PluginManager; } // tolua_export
cAuthenticator & GetAuthenticator (void) { return m_Authenticator; }
cMojangAPI & GetMojangAPI (void) { return m_MojangAPI; }
- cRankManager * GetRankManager (void) { return m_RankManager; }
+ cRankManager * GetRankManager (void) { return m_RankManager.get(); }
/** Queues a console command for execution through the cServer class.
The command will be executed in the tick thread
@@ -126,6 +127,12 @@ public:
/// Finds a player from a partial or complete player name and calls the callback - case-insensitive
bool FindAndDoWithPlayer(const AString & a_PlayerName, cPlayerListCallback & a_Callback); // >> EXPORTED IN MANUALBINDINGS <<
+ /** Finds the player over his uuid and calls the callback */
+ bool DoWithPlayerByUUID(const AString & a_PlayerUUID, cPlayerListCallback & a_Callback); // >> EXPORTED IN MANUALBINDINGS <<
+
+ /** Finds the player using it's complete username and calls the callback */
+ bool DoWithPlayer(const AString & a_PlayerName, cPlayerListCallback & a_Callback);
+
// tolua_begin
/// Sends a chat message to all connected clients (in all worlds)
@@ -174,7 +181,7 @@ private:
cCriticalSection m_CSPendingCommands;
cCommandQueue m_PendingCommands;
- cThread * m_InputThread;
+ std::thread m_InputThread;
cServer * m_Server;
cMonsterConfig * m_MonsterConfig;
@@ -185,7 +192,9 @@ private:
cPluginManager * m_PluginManager;
cAuthenticator m_Authenticator;
cMojangAPI m_MojangAPI;
- cRankManager * m_RankManager;
+
+ std::unique_ptr<cRankManager> m_RankManager;
+
cHTTPServer m_HTTPServer;
bool m_bStop;
@@ -207,10 +216,10 @@ private:
/// Does the actual work of executing a command
void DoExecuteConsoleCommand(const AString & a_Cmd);
-
- static void InputThread(void* a_Params);
static cRoot* s_Root;
+
+ static void InputThread(cRoot & a_Params);
}; // tolua_export