1
1
mirror of https://github.com/CyberL1/MyMcRealms.git synced 2024-12-24 13:28:22 -05:00

feat: world name if ops not empty

This commit is contained in:
CyberL1 2024-05-13 15:41:15 +02:00
parent f795ebcf26
commit fbc1e64d18

View File

@ -35,13 +35,14 @@ namespace MyMcRealms.Controllers
string worldOwnerName = world.Ops.ToArray().Length == 0 ? "Owner" : world.Ops[0].Name;
string worldOwnerUuid = world.Ops.ToArray().Length == 0 ? "069a79f444e94726a5befca90e38aaf5" : world.Ops[0].Uuid;
string worldName = world.Ops.ToArray().Length == 0 ? world.ServerName : $"{world.Ops[0].Name}'s server";
WorldResponse response = new()
{
Id = AllServers.Servers.IndexOf(world),
Owner = worldOwnerName,
OwnerUUID = worldOwnerUuid,
Name = world.ServerName,
Name = worldName,
Motd = world.Motd,
State = isCompatibleOnOlderVersions,
WorldType = "NORMAL",