mirror of
https://github.com/CyberL1/MyMcRealms.git
synced 2024-12-24 13:28:22 -05:00
fix: check if world's motd is longer than the limit first (idk some C# shenanigans)
This commit is contained in:
parent
9976c0bbb5
commit
79c97c7415
@ -54,10 +54,16 @@ namespace MyMcRealms.Controllers
|
||||
}
|
||||
|
||||
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
|
||||
if (world.Motd.Length > 32)
|
||||
{
|
||||
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
|
||||
if (world.Motd.Length > 52)
|
||||
{
|
||||
world.Motd = world.Motd.Remove(52); // Post 1.19.4 MOTD limit
|
||||
}
|
||||
}
|
||||
|
||||
WorldResponse response = new()
|
||||
|
Loading…
Reference in New Issue
Block a user