Wizards of Lua

The Art of Spell Crafting


ChunkLoadEvent

The ChunkLoadEvent occurs when a world chunk is loaded into the server’s memory.

Example

Printing all ChunkLoadEvents when they occur.

Events.on('ChunkLoadEvent'):call(function(event)
 print(string.format("Loaded world chunk at %s,%s", event.chunkX, event.chunkZ))
end)

The ChunkLoadEvent class is a subtype of the ChunkEvent class and inherits all its properties and functions.