Ejemplo n.º 1
0
 private void OnWorldCreated(WorldCreatedEventArgs e)
 {
     foreach (EventListener bl in Plugins)
     {
         WorldListener ll = (WorldListener)bl.Listener;
         if (bl.Event == Event.WORLD_CREATE)
             ll.OnWorldCreated(e);
     }
 }
Ejemplo n.º 2
0
        /// <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;
        }
Ejemplo n.º 3
0
 public virtual void OnWorldCreated(WorldCreatedEventArgs e)
 {
 }