diff --git a/MyMcRealms/Controllers/WorldsController.cs b/MyMcRealms/Controllers/WorldsController.cs index e0ca433..dab3220 100644 --- a/MyMcRealms/Controllers/WorldsController.cs +++ b/MyMcRealms/Controllers/WorldsController.cs @@ -75,6 +75,7 @@ namespace MyMcRealms.Controllers OwnerUUID = worldOwnerUuid, Name = worldName, Motd = world.Motd.Replace("�", "§").Replace("&", "§"), + IsHardcore = world.Difficulty == "hard", State = worldState, WorldType = "NORMAL", MaxPlayers = 10, @@ -161,6 +162,7 @@ namespace MyMcRealms.Controllers OwnerUUID = worldOwnerUuid, Name = worldName, Motd = world.Motd.Replace("�", "§"), + IsHardcore = world.Difficulty == "hard", State = whitelist.Enabled ? "CLOSED" : "OPEN", WorldType = "NORMAL", MaxPlayers = 10, diff --git a/MyMcRealms/MyMcAPI/Responses/AllServersResponse.cs b/MyMcRealms/MyMcAPI/Responses/AllServersResponse.cs index 13dff80..284c5ca 100644 --- a/MyMcRealms/MyMcAPI/Responses/AllServersResponse.cs +++ b/MyMcRealms/MyMcAPI/Responses/AllServersResponse.cs @@ -19,6 +19,7 @@ public bool WhitelistEnable { get; set; } public string OwnersToken { get; set; } = string.Empty; public string Gamemode { get; set; } = null!; + public string Difficulty { get; set; } = null!; } public class Op diff --git a/MyMcRealms/Responses/SlotResponse.cs b/MyMcRealms/Responses/SlotResponse.cs index d69ac8d..c2f553e 100644 --- a/MyMcRealms/Responses/SlotResponse.cs +++ b/MyMcRealms/Responses/SlotResponse.cs @@ -3,6 +3,12 @@ public class SlotResponse { public int SlotId { get; set; } + public SlotSettingsResponse Settings { get; set; } = null!; public string Options { get; set; } = null!; + + public SlotResponse() + { + Settings = new SlotSettingsResponse(); + } } -} +} \ No newline at end of file diff --git a/MyMcRealms/Responses/SlotSettingsResponse.cs b/MyMcRealms/Responses/SlotSettingsResponse.cs new file mode 100644 index 0000000..68a2dfd --- /dev/null +++ b/MyMcRealms/Responses/SlotSettingsResponse.cs @@ -0,0 +1,7 @@ +namespace MyMcRealms.Responses +{ + public class SlotSettingsResponse + { + public bool Hardcore = false; + } +} diff --git a/MyMcRealms/Responses/WorldResponse.cs b/MyMcRealms/Responses/WorldResponse.cs index 9cf197c..a413bec 100644 --- a/MyMcRealms/Responses/WorldResponse.cs +++ b/MyMcRealms/Responses/WorldResponse.cs @@ -8,7 +8,7 @@ public string? Name { get; set; } public string? Motd { get; set; } public int GameMode { get; set; } - public bool Hardcore { get; set; } + public bool IsHardcore { get; set; } public string State { get; set; } = "OPEN"; public string WorldType { get; set; } = "NORMAL"; public List Players { get; set; } = [];