Merge pull request #46 from MasterDurron/configurable-server-port
Server port is now configurable
This commit is contained in:
commit
9a2b0a6547
@ -25,11 +25,19 @@ namespace TrueCraft
|
||||
{
|
||||
MOTD = ChatColor.Red + "Welcome to TrueCraft!";
|
||||
Debug = new DebugConfiguration();
|
||||
ServerPort = 25565;
|
||||
ServerAddress = "0.0.0.0";
|
||||
}
|
||||
|
||||
[YamlMember(Alias="motd")]
|
||||
public string MOTD { get; set; }
|
||||
|
||||
[YamlMember(Alias="serverPort")]
|
||||
public int ServerPort {get; set; }
|
||||
|
||||
[YamlMember(Alias="serverAddress")]
|
||||
public string ServerAddress{get; set; }
|
||||
|
||||
[YamlMember(Alias="debug")]
|
||||
public DebugConfiguration Debug { get; set; }
|
||||
}
|
||||
|
@ -67,7 +67,7 @@ namespace TrueCraft
|
||||
#endif
|
||||
CommandManager = new CommandManager();
|
||||
Server.ChatMessageReceived += HandleChatMessageReceived;
|
||||
Server.Start(new IPEndPoint(IPAddress.Any, 25565));
|
||||
Server.Start(new IPEndPoint(IPAddress.Parse(Configuration.ServerAddress), Configuration.ServerPort));
|
||||
Console.CancelKeyPress += HandleCancelKeyPress;
|
||||
while (true)
|
||||
{
|
||||
|
Loading…
x
Reference in New Issue
Block a user