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; }
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; }
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; }
private void OnWorldLoaded(WorldLoadEventArgs e) { foreach (EventListener bl in Plugins) { WorldListener ll = (WorldListener)bl.Listener; if (bl.Event == Event.WORLD_LOAD) ll.OnWorldLoaded(e); } }
public virtual void OnWorldLoaded(WorldLoadEventArgs e) { }