1
1
mirror of https://github.com/CyberL1/MyMcRealms.git synced 2024-12-25 05:48:23 -05:00

fix: slots on <1.21.1

This commit is contained in:
CyberL1 2024-12-13 22:25:10 +01:00
parent 0e06049d6e
commit 67d324971e
5 changed files with 18 additions and 2 deletions

View File

@ -75,6 +75,7 @@ namespace MyMcRealms.Controllers
OwnerUUID = worldOwnerUuid,
Name = worldName,
Motd = world.Motd.Replace("<22>", "§").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("<22>", "§"),
IsHardcore = world.Difficulty == "hard",
State = whitelist.Enabled ? "CLOSED" : "OPEN",
WorldType = "NORMAL",
MaxPlayers = 10,

View File

@ -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

View File

@ -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();
}
}
}

View File

@ -0,0 +1,7 @@
namespace MyMcRealms.Responses
{
public class SlotSettingsResponse
{
public bool Hardcore = false;
}
}

View File

@ -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<PlayerResponse> Players { get; set; } = [];