예제 #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);
     }
 }
예제 #2
0
파일: Server.cs 프로젝트: IdentErr/c-raft
        /// <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;
        }
예제 #3
0
 public virtual void OnWorldCreated(WorldCreatedEventArgs e)
 {
 }