summaryrefslogtreecommitdiffstats
path: root/source/Root.cpp
diff options
context:
space:
mode:
authormadmaxoft@gmail.com <madmaxoft@gmail.com@0a769ca7-a7f5-676a-18bf-c427514a06d6>2013-02-15 14:00:59 +0100
committermadmaxoft@gmail.com <madmaxoft@gmail.com@0a769ca7-a7f5-676a-18bf-c427514a06d6>2013-02-15 14:00:59 +0100
commit34b3c13404c466c8f64d198dce914a1e3fa094c2 (patch)
tree351964785344dd92f2f0043fab89878b1abf5b6b /source/Root.cpp
parentFixed one-hit-blocks not being broken server-side (diff)
downloadcuberite-34b3c13404c466c8f64d198dce914a1e3fa094c2.tar
cuberite-34b3c13404c466c8f64d198dce914a1e3fa094c2.tar.gz
cuberite-34b3c13404c466c8f64d198dce914a1e3fa094c2.tar.bz2
cuberite-34b3c13404c466c8f64d198dce914a1e3fa094c2.tar.lz
cuberite-34b3c13404c466c8f64d198dce914a1e3fa094c2.tar.xz
cuberite-34b3c13404c466c8f64d198dce914a1e3fa094c2.tar.zst
cuberite-34b3c13404c466c8f64d198dce914a1e3fa094c2.zip
Diffstat (limited to 'source/Root.cpp')
-rw-r--r--source/Root.cpp27
1 files changed, 19 insertions, 8 deletions
diff --git a/source/Root.cpp b/source/Root.cpp
index 72003ca72..41788ff8d 100644
--- a/source/Root.cpp
+++ b/source/Root.cpp
@@ -73,7 +73,7 @@ void cRoot::InputThread(void * a_Params)
{
std::string Command;
std::getline(std::cin, Command);
- self.ServerCommand(Command);
+ self.ExecuteConsoleCommand(Command);
}
}
@@ -149,7 +149,7 @@ void cRoot::Start(void)
LoadWorlds();
LOG("Loading plugin manager...");
- m_PluginManager = new cPluginManager(); // This should be last
+ m_PluginManager = new cPluginManager();
m_PluginManager->ReloadPluginsNow();
LOG("Loading MonsterConfig...");
@@ -348,11 +348,11 @@ bool cRoot::ForEachWorld(cWorldListCallback & a_Callback)
-void cRoot::TickWorlds( float a_Dt )
+void cRoot::TickWorlds(float a_Dt)
{
- for( WorldMap::iterator itr = m_WorldsByName.begin(); itr != m_WorldsByName.end(); ++itr )
+ for (WorldMap::iterator itr = m_WorldsByName.begin(); itr != m_WorldsByName.end(); ++itr)
{
- itr->second->Tick( a_Dt );
+ itr->second->Tick(a_Dt);
}
}
@@ -360,10 +360,12 @@ void cRoot::TickWorlds( float a_Dt )
-void cRoot::ServerCommand(const AString & a_Cmd)
+void cRoot::ExecuteConsoleCommand(const AString & a_Cmd)
{
- LOG("Server console command: \"%s\"", a_Cmd.c_str());
- m_Server->ServerCommand(a_Cmd);
+ LOG("Executing console command: \"%s\"", a_Cmd.c_str());
+ m_Server->ExecuteConsoleCommand(a_Cmd);
+
+ // Some commands are built-in:
if (a_Cmd == "stop")
{
m_bStop = true;
@@ -491,6 +493,15 @@ bool cRoot::FindAndDoWithPlayer(const AString & a_PlayerName, cPlayerListCallbac
+AString cRoot::GetProtocolVersionTextFromInt(int a_ProtocolVersion)
+{
+ return cProtocolRecognizer::GetVersionTextFromInt(a_ProtocolVersion);
+}
+
+
+
+
+
void cRoot::LogChunkStats(void)
{
int SumNumValid = 0;