mirror of
https://github.com/CyberL1/MyMcRealms.git
synced 2024-11-22 05:58:21 -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 worldOwnerName = world.Ops.ToArray().Length == 0 ? "Owner" : world.Ops[0].Name;
|
||||||
string worldOwnerUuid = world.Ops.ToArray().Length == 0 ? "069a79f444e94726a5befca90e38aaf5" : world.Ops[0].Uuid;
|
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()
|
WorldResponse response = new()
|
||||||
{
|
{
|
||||||
Id = AllServers.Servers.IndexOf(world),
|
Id = AllServers.Servers.IndexOf(world),
|
||||||
Owner = worldOwnerName,
|
Owner = worldOwnerName,
|
||||||
OwnerUUID = worldOwnerUuid,
|
OwnerUUID = worldOwnerUuid,
|
||||||
Name = world.ServerName,
|
Name = worldName,
|
||||||
Motd = world.Motd,
|
Motd = world.Motd,
|
||||||
State = isCompatibleOnOlderVersions,
|
State = isCompatibleOnOlderVersions,
|
||||||
WorldType = "NORMAL",
|
WorldType = "NORMAL",
|
||||||
|
Loading…
Reference in New Issue
Block a user