예제 #1
0
        public bool Load()
        {
            EnsureDirectory();

            //Event
            WorldLoadEventArgs e = new WorldLoadEventArgs(this);
            Server.PluginManager.CallEvent("WORLD_LOAD", e);
            if (e.EventCanceled) return false;
            //End Event

            Generator = new ChunkGenerator(this, GetSeed());
            ChunkManager = new WorldChunkManager(this);

            InitializeSpawn();
            InitializeThreads();
            InitializeWeather();
            return true;
        }
예제 #2
0
        public bool Load()
        {
            EnsureDirectory();

            //Event
            WorldLoadEventArgs e = new WorldLoadEventArgs(this);
            Server.PluginManager.CallEvent(Event.WorldLoad, e);
            if (e.EventCanceled) return false;
            //End Event

            _chunkProvider = new ChunkProvider(this);
            _generator = _chunkProvider.GetNewGenerator(GeneratorType.Custom, GetSeed());
            PhysicsBlocks = new ConcurrentDictionary<int, BaseFallingPhysics>();

            InitializeSpawn();
            InitializeWeather();
            Running = true;
            return true;
        }
예제 #3
0
        public bool Load()
        {
            EnsureDirectory();

            //Event
            WorldLoadEventArgs e = new WorldLoadEventArgs(this);
            Server.PluginManager.CallEvent(Event.WORLD_LOAD, e);
            if (e.EventCanceled) return false;
            //End Event

            _ChunkProvider = new ChunkProvider(this);
            Generator = _ChunkProvider.GetNewGenerator(GeneratorType.Custom, GetSeed());
            ChunkManager = new WorldChunkManager(this);
            PhysicsBlocks = new ConcurrentDictionary<int, BlockBasePhysics>();

            InitializeSpawn();
            InitializeThreads();
            InitializeWeather();
            return true;
        }
예제 #4
0
 private void OnWorldLoaded(WorldLoadEventArgs e)
 {
     foreach (EventListener bl in Plugins)
     {
         WorldListener ll = (WorldListener)bl.Listener;
         if (bl.Event == Event.WORLD_LOAD)
             ll.OnWorldLoaded(e);
     }
 }
예제 #5
0
 public virtual void OnWorldLoaded(WorldLoadEventArgs e)
 {
 }