mirror of
https://github.com/MCCTeam/Minecraft-Console-Client
synced 2025-11-07 17:36:07 +00:00
Reamls worlds: Use expired property to determine available world
This commit is contained in:
parent
83521d7cca
commit
8efb8d80a4
1 changed files with 8 additions and 12 deletions
|
|
@ -700,12 +700,9 @@ namespace MinecraftClient.Protocol
|
|||
if (realmsServer.Properties.ContainsKey("name")
|
||||
&& realmsServer.Properties.ContainsKey("owner")
|
||||
&& realmsServer.Properties.ContainsKey("id")
|
||||
&& realmsServer.Properties.ContainsKey("daysLeft"))
|
||||
&& realmsServer.Properties.ContainsKey("expired"))
|
||||
{
|
||||
int daysLeft;
|
||||
if (int.TryParse(realmsServer.Properties["daysLeft"].StringValue, out daysLeft))
|
||||
{
|
||||
if (daysLeft > 0)
|
||||
if (realmsServer.Properties["expired"].StringValue == "false")
|
||||
{
|
||||
availableWorlds.Add(String.Format("[{0}] {2} ({3}) - {1}",
|
||||
index++,
|
||||
|
|
@ -716,7 +713,6 @@ namespace MinecraftClient.Protocol
|
|||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
if (availableWorlds.Count > 0)
|
||||
{
|
||||
Translations.WriteLine("mcc.realms_available");
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue