diff options
author | Howaner <franzi.moos@googlemail.com> | 2014-11-14 22:33:54 +0100 |
---|---|---|
committer | Howaner <franzi.moos@googlemail.com> | 2014-11-14 22:33:54 +0100 |
commit | a0e1e43fc187d79021b4e84e70729255f7f690e2 (patch) | |
tree | 933304dcec7bc698bf7c0f70fe8938d46c642113 /src/World.cpp | |
parent | ... in this world (diff) | |
parent | Noise3D: Added jungles. (diff) | |
download | cuberite-a0e1e43fc187d79021b4e84e70729255f7f690e2.tar cuberite-a0e1e43fc187d79021b4e84e70729255f7f690e2.tar.gz cuberite-a0e1e43fc187d79021b4e84e70729255f7f690e2.tar.bz2 cuberite-a0e1e43fc187d79021b4e84e70729255f7f690e2.tar.lz cuberite-a0e1e43fc187d79021b4e84e70729255f7f690e2.tar.xz cuberite-a0e1e43fc187d79021b4e84e70729255f7f690e2.tar.zst cuberite-a0e1e43fc187d79021b4e84e70729255f7f690e2.zip |
Diffstat (limited to 'src/World.cpp')
-rw-r--r-- | src/World.cpp | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/src/World.cpp b/src/World.cpp index 4e6ca264f..288cf0154 100644 --- a/src/World.cpp +++ b/src/World.cpp @@ -2732,6 +2732,23 @@ bool cWorld::FindAndDoWithPlayer(const AString & a_PlayerNameHint, cPlayerListCa +bool cWorld::DoWithPlayerByUUID(const AString & a_PlayerUUID, cPlayerListCallback & a_Callback) +{ + cCSLock Lock(m_CSPlayers); + for (cPlayerList::iterator itr = m_Players.begin(); itr != m_Players.end(); ++itr) + { + if ((*itr)->GetUUID() == a_PlayerUUID) + { + return a_Callback.Item(*itr); + } + } + return false; +} + + + + + // TODO: This interface is dangerous! cPlayer * cWorld::FindClosestPlayer(const Vector3d & a_Pos, float a_SightLimit, bool a_CheckLineOfSight) { |