diff options
author | Tiger Wang <ziwei.tiger@hotmail.co.uk> | 2016-08-29 14:20:58 +0200 |
---|---|---|
committer | Tiger Wang <ziwei.tiger@hotmail.co.uk> | 2016-08-29 14:20:58 +0200 |
commit | b69551affce13678c38292529e76d791756187e5 (patch) | |
tree | 1b721dde0e485c2e141972c69db0ad70fe94b8be /src | |
parent | test (diff) | |
download | cuberite-b69551affce13678c38292529e76d791756187e5.tar cuberite-b69551affce13678c38292529e76d791756187e5.tar.gz cuberite-b69551affce13678c38292529e76d791756187e5.tar.bz2 cuberite-b69551affce13678c38292529e76d791756187e5.tar.lz cuberite-b69551affce13678c38292529e76d791756187e5.tar.xz cuberite-b69551affce13678c38292529e76d791756187e5.tar.zst cuberite-b69551affce13678c38292529e76d791756187e5.zip |
Diffstat (limited to 'src')
-rw-r--r-- | src/Entities/Player.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/Entities/Player.cpp b/src/Entities/Player.cpp index 390e4ad52..babe31978 100644 --- a/src/Entities/Player.cpp +++ b/src/Entities/Player.cpp @@ -158,6 +158,12 @@ cPlayer::cPlayer(std::weak_ptr<cClientHandle> a_Client, const AString & a_Player cPlayer::~cPlayer(void) { + if (!cRoot::Get()->GetPluginManager()->CallHookPlayerDestroyed(*this)) + { + cRoot::Get()->BroadcastChatLeave(Printf("%s has left the game", GetName().c_str())); + LOGINFO("Player %s has left the game", GetName().c_str()); + } + LOGD("Deleting cPlayer \"%s\" at %p, ID %d", GetName().c_str(), static_cast<void *>(this), GetUniqueID()); // Notify the server that the player is being destroyed |