diff options
author | madmaxoft <github@xoft.cz> | 2013-08-01 09:36:33 +0200 |
---|---|---|
committer | madmaxoft <github@xoft.cz> | 2013-08-01 09:36:33 +0200 |
commit | 3683601b8b64dae567f90966813ec3b7c2aff2c9 (patch) | |
tree | 03922709926f36a03f6d89e3ac0be6c72020e5f0 /source/World.cpp | |
parent | Merged in the latest core changes. (diff) | |
parent | ProtoProxy: Tab completion logging lists the last item, too (diff) | |
download | cuberite-3683601b8b64dae567f90966813ec3b7c2aff2c9.tar cuberite-3683601b8b64dae567f90966813ec3b7c2aff2c9.tar.gz cuberite-3683601b8b64dae567f90966813ec3b7c2aff2c9.tar.bz2 cuberite-3683601b8b64dae567f90966813ec3b7c2aff2c9.tar.lz cuberite-3683601b8b64dae567f90966813ec3b7c2aff2c9.tar.xz cuberite-3683601b8b64dae567f90966813ec3b7c2aff2c9.tar.zst cuberite-3683601b8b64dae567f90966813ec3b7c2aff2c9.zip |
Diffstat (limited to 'source/World.cpp')
-rw-r--r-- | source/World.cpp | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/source/World.cpp b/source/World.cpp index b632fe7f9..880f6e5b2 100644 --- a/source/World.cpp +++ b/source/World.cpp @@ -2364,6 +2364,24 @@ int cWorld::SpawnMob(double a_PosX, double a_PosY, double a_PosZ, int a_EntityTy +void cWorld::TabCompleteUserName(const AString & a_Text, AStringVector & a_Results) +{ + cCSLock Lock(m_CSPlayers); + for (cPlayerList::iterator itr = m_Players.begin(), end = m_Players.end(); itr != end; ++itr) + { + if (NoCaseCompare((*itr)->GetName().substr(0, a_Text.length()), a_Text) != 0) + { + // Player name doesn't match + continue; + } + a_Results.push_back((*itr)->GetName()); + } +} + + + + + cFluidSimulator * cWorld::InitializeFluidSimulator(cIniFile & a_IniFile, const char * a_FluidName, BLOCKTYPE a_SimulateBlock, BLOCKTYPE a_StationaryBlock) { AString SimulatorNameKey; |