mirror of
https://github.com/CyberL1/MyMcRealms.git
synced 2024-11-21 05:38:20 -05:00
feat: world name if ops not empty
This commit is contained in:
parent
f795ebcf26
commit
fbc1e64d18
@ -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",
|
||||
|
Loading…
Reference in New Issue
Block a user