summaryrefslogtreecommitdiffstats
path: root/source/Entity.cpp
diff options
context:
space:
mode:
authormadmaxoft <github@xoft.cz>2013-08-08 09:13:13 +0200
committermadmaxoft <github@xoft.cz>2013-08-08 09:13:13 +0200
commit3f4abe8c95e4d37a84018ca4d478a908fca423ac (patch)
tree4315077d767775ae9bd938a6301d59c0191c507d /source/Entity.cpp
parentMerge branch 'master' of github.com:mc-server/MCServer (diff)
downloadcuberite-3f4abe8c95e4d37a84018ca4d478a908fca423ac.tar
cuberite-3f4abe8c95e4d37a84018ca4d478a908fca423ac.tar.gz
cuberite-3f4abe8c95e4d37a84018ca4d478a908fca423ac.tar.bz2
cuberite-3f4abe8c95e4d37a84018ca4d478a908fca423ac.tar.lz
cuberite-3f4abe8c95e4d37a84018ca4d478a908fca423ac.tar.xz
cuberite-3f4abe8c95e4d37a84018ca4d478a908fca423ac.tar.zst
cuberite-3f4abe8c95e4d37a84018ca4d478a908fca423ac.zip
Diffstat (limited to 'source/Entity.cpp')
-rw-r--r--source/Entity.cpp10
1 files changed, 9 insertions, 1 deletions
diff --git a/source/Entity.cpp b/source/Entity.cpp
index 2c822d0cc..8afdfdb95 100644
--- a/source/Entity.cpp
+++ b/source/Entity.cpp
@@ -129,14 +129,22 @@ const char * cEntity::GetParentClass(void) const
-void cEntity::Initialize(cWorld * a_World)
+bool cEntity::Initialize(cWorld * a_World)
{
+ if (cPluginManager::Get()->CallHookSpawningEntity(*a_World, *this))
+ {
+ return false;
+ }
+
LOGD("Initializing entity #%d (%s) at {%.02f, %.02f, %.02f}",
m_UniqueID, GetClass(), m_Pos.x, m_Pos.y, m_Pos.z
);
m_IsInitialized = true;
m_World = a_World;
m_World->AddEntity(this);
+
+ cPluginManager::Get()->CallHookSpawnedEntity(*a_World, *this);
+ return true;
}