private void OnWorldCreated(WorldCreatedEventArgs e) { foreach (EventListener bl in Plugins) { WorldListener ll = (WorldListener)bl.Listener; if (bl.Event == Event.WORLD_CREATE) ll.OnWorldCreated(e); } }
/// <summary> /// Creates a new world. /// </summary> /// <param name="name">The name of the folder to contain and identify the world.</param> /// <returns>The newly created world.</returns> public WorldManager CreateWorld(string name) { WorldManager world = new WorldManager(this); //Event WorldCreatedEventArgs e = new WorldCreatedEventArgs(world); PluginManager.CallEvent(Event.WorldCreate, e); if (e.EventCanceled) return null; //End Event lock (Worlds) Worlds.Add(world); return world; }
public virtual void OnWorldCreated(WorldCreatedEventArgs e) { }