1
0
mirror of https://github.com/CyberL1/MyMcRealms.git synced 2024-11-24 23:18:22 -05:00

chore: remove unused checks

This commit is contained in:
CyberL1 2024-09-22 18:57:09 +02:00
parent 79c97c7415
commit 29f3b9133f

View File

@ -53,14 +53,13 @@ namespace MyMcRealms.Controllers
worldState = "CLOSED"; worldState = "CLOSED";
} }
if (SemVersion.Parse(gameVerision, SemVersionStyles.OptionalPatch).ComparePrecedenceTo(SemVersion.Parse("1.19.4", SemVersionStyles.OptionalPatch)) < 0) { if (SemVersion.Parse(gameVerision, SemVersionStyles.OptionalPatch).ComparePrecedenceTo(SemVersion.Parse("1.19.4", SemVersionStyles.OptionalPatch)) < 0)
{
if (world.Motd.Length > 32) if (world.Motd.Length > 32)
{ {
world.Motd = world.Motd.Remove(32); // Pre 1.19.4 MOTD limit world.Motd = world.Motd.Remove(32); // Pre 1.19.4 MOTD limit
} }
} else else if (world.Motd.Length > 52)
{
if (world.Motd.Length > 52)
{ {
world.Motd = world.Motd.Remove(52); // Post 1.19.4 MOTD limit world.Motd = world.Motd.Remove(52); // Post 1.19.4 MOTD limit
} }
@ -122,9 +121,9 @@ namespace MyMcRealms.Controllers
return BadRequest(errorResponse); return BadRequest(errorResponse);
} }
string worldOwnerName = world.Ops.ToArray().Length == 0 ? "Owner" : world.Ops[0].Name; string worldOwnerName = world.Ops[0].Name;
string worldOwnerUuid = world.Ops.ToArray().Length == 0 ? "069a79f444e94726a5befca90e38aaf5" : world.Ops[0].Uuid; string worldOwnerUuid = world.Ops[0].Uuid;
string worldName = world.Ops.ToArray().Length == 0 ? world.ServerName : $"{world.Ops[0].Name}'s server"; string worldName = $"{world.Ops[0].Name}'s server";
List<PlayerResponse> whitelistedPlayers = []; List<PlayerResponse> whitelistedPlayers = [];
foreach (var player in whitelist.Result) foreach (var player in whitelist.Result)