mirror of
https://github.com/CyberL1/MyMcRealms.git
synced 2024-12-24 21:38:23 -05:00
fix: slots on <1.21.1
This commit is contained in:
parent
0e06049d6e
commit
67d324971e
@ -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,
|
||||
|
@ -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
|
||||
|
@ -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();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
7
MyMcRealms/Responses/SlotSettingsResponse.cs
Normal file
7
MyMcRealms/Responses/SlotSettingsResponse.cs
Normal file
@ -0,0 +1,7 @@
|
||||
namespace MyMcRealms.Responses
|
||||
{
|
||||
public class SlotSettingsResponse
|
||||
{
|
||||
public bool Hardcore = false;
|
||||
}
|
||||
}
|
@ -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; } = [];
|
||||
|
Loading…
Reference in New Issue
Block a user