diff options
author | faketruth <faketruth@0a769ca7-a7f5-676a-18bf-c427514a06d6> | 2012-10-17 14:19:20 +0200 |
---|---|---|
committer | faketruth <faketruth@0a769ca7-a7f5-676a-18bf-c427514a06d6> | 2012-10-17 14:19:20 +0200 |
commit | dc7f91c2a16227f9195ab9273290294a25689194 (patch) | |
tree | bee99af2f3c88b5ef4bac810debc103c3b2cb812 /source | |
parent | More blocks can be washed away by fluids. (diff) | |
download | cuberite-dc7f91c2a16227f9195ab9273290294a25689194.tar cuberite-dc7f91c2a16227f9195ab9273290294a25689194.tar.gz cuberite-dc7f91c2a16227f9195ab9273290294a25689194.tar.bz2 cuberite-dc7f91c2a16227f9195ab9273290294a25689194.tar.lz cuberite-dc7f91c2a16227f9195ab9273290294a25689194.tar.xz cuberite-dc7f91c2a16227f9195ab9273290294a25689194.tar.zst cuberite-dc7f91c2a16227f9195ab9273290294a25689194.zip |
Diffstat (limited to 'source')
-rw-r--r-- | source/ClientHandle.cpp | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/source/ClientHandle.cpp b/source/ClientHandle.cpp index f526432b4..792fc3db4 100644 --- a/source/ClientHandle.cpp +++ b/source/ClientHandle.cpp @@ -230,7 +230,7 @@ void cClientHandle::Authenticate(void) m_Player->SetIP (m_IPString); - cRoot::Get()->GetPluginManager()->CallHook(cPluginManager::HOOK_PLAYER_SPAWN, 1, m_Player); + cRoot::Get()->GetPluginManager()->CallHook(cPluginManager::HOOK_PLAYER_JOIN, 1, m_Player); m_ConfirmPosition = m_Player->GetPosition(); @@ -258,6 +258,8 @@ void cClientHandle::Authenticate(void) // Broadcast this player's spawning to all other players in the same chunk m_Player->GetWorld()->BroadcastSpawn(*m_Player, this); + + cRoot::Get()->GetPluginManager()->CallHook(cPluginManager::HOOK_PLAYER_SPAWN, 1, m_Player); } @@ -920,7 +922,13 @@ void cClientHandle::HandleUseEntity(int a_TargetEntityID, bool a_IsLeftClick) void cClientHandle::HandleRespawn(void) { + if( m_Player == NULL ) + { + Destroy(); + return; + } m_Player->Respawn(); + cRoot::Get()->GetPluginManager()->CallHook(cPluginManager::HOOK_PLAYER_SPAWN, 1, m_Player); } |