1
1
mirror of https://github.com/CyberL1/MyMcRealms.git synced 2025-04-02 14:08:36 -04:00

Compare commits

...

2 Commits

Author SHA1 Message Date
9976c0bbb5 fix: cut world's motd to its limit 2024-09-21 13:16:01 +02:00
6e27e44746 fix: dashless world owner uuid 2024-09-21 12:48:52 +02:00

View File

@ -44,7 +44,7 @@ namespace MyMcRealms.Controllers
bool isBanned = world.Banlist.Any(p => p.Name == playerName);
string worldOwnerName = world.Ops.ToArray().Length == 0 ? "Not claimed" : world.Ops[0].Name;
string worldOwnerUuid = world.Ops.ToArray().Length == 0 ? "069a79f444e94726a5befca90e38aaf5" : world.Ops[0].Uuid;
string worldOwnerUuid = world.Ops.ToArray().Length == 0 ? "069a79f444e94726a5befca90e38aaf5" : world.Ops[0].Uuid.Replace("-", "");
string worldName = world.Ops.ToArray().Length == 0 ? world.ServerName : $"{world.Ops[0].Name}'s server";
string worldState = !isBanned ? "OPEN" : "CLOSED";
@ -53,6 +53,13 @@ namespace MyMcRealms.Controllers
worldState = "CLOSED";
}
if (SemVersion.Parse(gameVerision, SemVersionStyles.OptionalPatch).ComparePrecedenceTo(SemVersion.Parse("1.19.4", SemVersionStyles.OptionalPatch)) < 0) {
world.Motd = world.Motd.Remove(32); // Pre 1.19.4 MOTD limit
} else
{
world.Motd = world.Motd.Remove(52); // Post 1.19.4 MOTD limit
}
WorldResponse response = new()
{
Id = AllServers.Servers.IndexOf(world),