diff options
author | Peter Bell <peterbell10@live.co.uk> | 2020-04-13 00:04:30 +0200 |
---|---|---|
committer | Mattes D <github@xoft.cz> | 2020-04-13 17:13:38 +0200 |
commit | 43525c5df8ec537d8ce83278795962a3af09f858 (patch) | |
tree | 7006a43ddcdbdb59d493b12d350500e19d78d7bd /src/Server.cpp | |
parent | Fixed entity teleport for just-spawned entities. (diff) | |
download | cuberite-43525c5df8ec537d8ce83278795962a3af09f858.tar cuberite-43525c5df8ec537d8ce83278795962a3af09f858.tar.gz cuberite-43525c5df8ec537d8ce83278795962a3af09f858.tar.bz2 cuberite-43525c5df8ec537d8ce83278795962a3af09f858.tar.lz cuberite-43525c5df8ec537d8ce83278795962a3af09f858.tar.xz cuberite-43525c5df8ec537d8ce83278795962a3af09f858.tar.zst cuberite-43525c5df8ec537d8ce83278795962a3af09f858.zip |
Diffstat (limited to 'src/Server.cpp')
-rw-r--r-- | src/Server.cpp | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/src/Server.cpp b/src/Server.cpp index fcafa5713..d371250ab 100644 --- a/src/Server.cpp +++ b/src/Server.cpp @@ -435,7 +435,14 @@ bool cServer::Start(void) bool cServer::Command(cClientHandle & a_Client, AString & a_Cmd) { - return cRoot::Get()->GetPluginManager()->CallHookChat(*(a_Client.GetPlayer()), a_Cmd); + bool Res = cRoot::Get()->DoWithPlayerByUUID( + a_Client.GetUUID(), + [&](cPlayer & a_Player) + { + return cRoot::Get()->GetPluginManager()->CallHookChat(a_Player, a_Cmd); + } + ); + return Res; } |