public Server(int port, string mapName = "test") { PORT = port; _instance = this; Events?.Clear(); Events = new ServerEvents(); CommandHandler = new CommandHandler(); AssetLoader.LoadServerAssets(); Map = AssetLoader.LoadMapFromFile(mapName); Map.LoadAllSpawners(); }
public Server(ServerStartConfig config) { PORT = config.Port; _instance = this; Events?.Clear(); Events = new ServerEvents(); CommandHandler = new CommandHandler(); TcpHandler = new ServerTcpHandler(); AssetLoader.LoadServerAssets(); Map = AssetLoader.LoadMapFromFile(config.MapName); if (!config.DisableSpawners) { Map.LoadAllSpawners(); } }