1
0
mirror of https://github.com/CyberL1/MyMcRealms.git synced 2024-11-21 05:38:20 -05:00

fix: cut world's motd to its limit

This commit is contained in:
CyberL1 2024-09-21 13:16:01 +02:00
parent 6e27e44746
commit 9976c0bbb5

View File

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