summaryrefslogtreecommitdiffstats
path: root/src/Server.cpp
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/Server.cpp9
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;
}