diff --git a/MyMcRealms/Controllers/WorldsController.cs b/MyMcRealms/Controllers/WorldsController.cs index 0cc4d78..3106cc8 100644 --- a/MyMcRealms/Controllers/WorldsController.cs +++ b/MyMcRealms/Controllers/WorldsController.cs @@ -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()