From 15af6a794ab1b75eb7a349e5de682a618b536c47 Mon Sep 17 00:00:00 2001 From: CyberL1 Date: Sat, 21 Dec 2024 13:12:16 +0100 Subject: [PATCH] fix: display real hardcore property (not the difficulty one) --- MyMcRealms/Controllers/WorldsController.cs | 4 ++-- MyMcRealms/MyMcAPI/Responses/AllServersResponse.cs | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/MyMcRealms/Controllers/WorldsController.cs b/MyMcRealms/Controllers/WorldsController.cs index dab3220..3a22c70 100644 --- a/MyMcRealms/Controllers/WorldsController.cs +++ b/MyMcRealms/Controllers/WorldsController.cs @@ -75,7 +75,7 @@ namespace MyMcRealms.Controllers OwnerUUID = worldOwnerUuid, Name = worldName, Motd = world.Motd.Replace("�", "§").Replace("&", "§"), - IsHardcore = world.Difficulty == "hard", + IsHardcore = world.Hardcore, State = worldState, WorldType = "NORMAL", MaxPlayers = 10, @@ -162,7 +162,7 @@ namespace MyMcRealms.Controllers OwnerUUID = worldOwnerUuid, Name = worldName, Motd = world.Motd.Replace("�", "§"), - IsHardcore = world.Difficulty == "hard", + IsHardcore = world.Hardcore, State = whitelist.Enabled ? "CLOSED" : "OPEN", WorldType = "NORMAL", MaxPlayers = 10, diff --git a/MyMcRealms/MyMcAPI/Responses/AllServersResponse.cs b/MyMcRealms/MyMcAPI/Responses/AllServersResponse.cs index 284c5ca..f5f71ec 100644 --- a/MyMcRealms/MyMcAPI/Responses/AllServersResponse.cs +++ b/MyMcRealms/MyMcAPI/Responses/AllServersResponse.cs @@ -19,7 +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 bool Hardcore { get; set; } } public class Op