====== OnChunkUnloaded hook callback function ======
MCServer calls this function when a chunk is unloaded from the memory. Though technically still in memory, the plugin should behave as if the chunk was already not present. In particular, [[API:cWorld|cWorld block API]] should not be used in the area of the specified chunk.

===== Function signature =====
<code lua>
function OnChunkUnloaded(World, ChunkX, ChunkZ)
</code>
Parameters:
| World | [[API::cWorld|cWorld]] | The world to which the chunk belongs |
| ChunkX | number | X-coord of the chunk |
| ChunkZ | number | Z-coord of the chunk |

===== Return values =====
If the function returns false or no value, the next plugin's callback is called. If the function returns true, no other callback is called for this event. There is no behavior that plugins could override.

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