NodeServer.addWorld

Creates and registers a world with its group, initialising its terrain, registering events, commands and tasks.

class NodeServer
shared synchronized
shared(WorldInfo)
addWorld
(
T : World = World
E...
)
(
string name
,)

Return Value

Type: shared(WorldInfo)

the WorldInfo of the created world or null if the a world with the same name already exists.

Examples

server.addWorld("world42"); // normal world
server.addWorld!CustomWorld("custom", 42); // custom world where 42 is passed to the constructor

Meta