/// <summary> /// Creates a new Minecraft server to listen on the requested /// endpoint. /// </summary> public MinecraftServer(IPEndPoint endPoint, ServerSettings settings) { Settings = settings; // Initialize variables Clients = new List<MinecraftClient>(); Levels = new List<Level>(); LogProviders = new List<ILogProvider>(); PluginChannels = new Dictionary<string, PluginChannel>(); EntityManager = new EntityManager(this); WeatherManager = new WeatherManager(this); // Bind socket Listener = new TcpListener(endPoint); NetworkLock = new object(); }
public MinecraftServer(Level level, ServerSettings settings) : this(level) { Settings = settings; }
public MinecraftServer(ServerSettings settings) : this() { Settings = settings; }
/// <summary> /// Creates a new Minecraft server to listen on the requested /// endpoint. /// </summary> public MinecraftServer(IPEndPoint endPoint, ServerSettings settings) { Settings = settings; // Initialize variables Clients = new List<MinecraftClient>(); Levels = new List<Level>(); LogProviders = new List<ILogProvider>(); PluginChannels = new Dictionary<string, PluginChannel>(); EntityManager = new EntityManager(this); WeatherManager = new WeatherManager(this); // Bind socket Socket = new Socket(AddressFamily.InterNetwork, SocketType.Stream, ProtocolType.Tcp); Socket.Bind(endPoint); }