diff options
author | madmaxoft@gmail.com <madmaxoft@gmail.com@0a769ca7-a7f5-676a-18bf-c427514a06d6> | 2012-06-05 17:20:48 +0200 |
---|---|---|
committer | madmaxoft@gmail.com <madmaxoft@gmail.com@0a769ca7-a7f5-676a-18bf-c427514a06d6> | 2012-06-05 17:20:48 +0200 |
commit | d832996e198605c20760c72433e35beca3192a5a (patch) | |
tree | aedaefb6b7753a14eb27c7c6fd3e8e3a3b7c3df3 /source/cPluginManager.cpp | |
parent | Fixed previous commit's recipes and items. (diff) | |
download | cuberite-d832996e198605c20760c72433e35beca3192a5a.tar cuberite-d832996e198605c20760c72433e35beca3192a5a.tar.gz cuberite-d832996e198605c20760c72433e35beca3192a5a.tar.bz2 cuberite-d832996e198605c20760c72433e35beca3192a5a.tar.lz cuberite-d832996e198605c20760c72433e35beca3192a5a.tar.xz cuberite-d832996e198605c20760c72433e35beca3192a5a.tar.zst cuberite-d832996e198605c20760c72433e35beca3192a5a.zip |
Diffstat (limited to '')
-rw-r--r-- | source/cPluginManager.cpp | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/source/cPluginManager.cpp b/source/cPluginManager.cpp index 0b1d11299..40e8d2b95 100644 --- a/source/cPluginManager.cpp +++ b/source/cPluginManager.cpp @@ -363,6 +363,25 @@ bool cPluginManager::CallHook( PluginHook a_Hook, unsigned int a_NumArgs, ... ) break;
}
+ case E_PLUGIN_CHUNK_GENERATED:
+ {
+ if (a_NumArgs != 3)
+ {
+ break;
+ }
+ va_list argptr;
+ va_start( argptr, a_NumArgs);
+ cWorld * World = va_arg(argptr, cWorld *);
+ int ChunkX = va_arg(argptr, int);
+ int ChunkZ = va_arg(argptr, int);
+ va_end (argptr);
+ for( PluginList::iterator itr = Plugins->second.begin(); itr != Plugins->second.end(); ++itr )
+ {
+ (*itr)->OnChunkGenerated(World, ChunkX, ChunkZ);
+ }
+ break;
+ }
+
default:
{
LOGWARNING("cPluginManager: Calling Unknown hook: %i", a_Hook );
|