summaryrefslogtreecommitdiffstats
path: root/src/World.cpp
diff options
context:
space:
mode:
authorVincent <vincent.leung60@gmail.com>2014-11-29 09:36:15 +0100
committerVincent <vincent.leung60@gmail.com>2014-11-29 09:36:15 +0100
commit61e761fdc2bfa5c77002d68bb24e0470def37b48 (patch)
treeefb8e5a7b544f9402d186201c1f9150511bcc1a9 /src/World.cpp
parentMerge pull request #1619 from mc-server/WarningFixes (diff)
downloadcuberite-61e761fdc2bfa5c77002d68bb24e0470def37b48.tar
cuberite-61e761fdc2bfa5c77002d68bb24e0470def37b48.tar.gz
cuberite-61e761fdc2bfa5c77002d68bb24e0470def37b48.tar.bz2
cuberite-61e761fdc2bfa5c77002d68bb24e0470def37b48.tar.lz
cuberite-61e761fdc2bfa5c77002d68bb24e0470def37b48.tar.xz
cuberite-61e761fdc2bfa5c77002d68bb24e0470def37b48.tar.zst
cuberite-61e761fdc2bfa5c77002d68bb24e0470def37b48.zip
Diffstat (limited to 'src/World.cpp')
-rw-r--r--src/World.cpp12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/World.cpp b/src/World.cpp
index 0dec0bd96..9ae9e41d9 100644
--- a/src/World.cpp
+++ b/src/World.cpp
@@ -3666,3 +3666,15 @@ void cWorld::cChunkGeneratorCallbacks::CallHookChunkGenerated (cChunkDesc & a_Ch
+
+std::list<std::string> cWorld::GetUsernames()
+{
+ std::list<std::string> usernames;
+ cCSLock Lock(m_CSPlayers);
+ for (cPlayerList::iterator itr = m_Players.begin(); itr != m_Players.end(); ++itr)
+ {
+ std::string username = (*itr)->GetName();
+ usernames.insert(usernames.begin(),username);
+ }
+ return usernames;
+}