======  OnSpawningMonster hook callback function ======
This callback is called before the server spawns a monster. The plugins may modify the monster's parameters in the cMonster class, or disallow the spawning altogether. This function is called before the [[API::Plugin:OnSpawningEntity|OnSpawningEntity]]() is called for the monster entity.

===== Function signature =====
<code lua>
function OnSpawningMonster(World, Monster)
</code>
Parameters:
| World | [[API:cWorld|cWorld]] | The world in which the entity is spawning |
| Monster | [[API:cMonster|cMonster]] | The monster that is spawning |

===== Return values =====
If the function returns false or no value, the next plugin's callback is called. Finally, the server spawns the monster with whatever parameters the plugins set in the cMonster parameter.

If the function returns true, no other callback is called for this event and the monster won't spawn.

===== Registering the callback =====
To register your plugin to receive a callback through this function, use the hook [[api:plugin:hooks|HOOK_SPAWNING_MONSTER]]
<code lua>
PluginManager = cPluginManager:GetPluginManager()
PluginManager:AddHook(Plugin, cPluginManager.HOOK_SPAWNING_MONSTER)
</code>