From fbc1e64d187045904354fdf3deedb9a18e9ed417 Mon Sep 17 00:00:00 2001 From: CyberL1 Date: Mon, 13 May 2024 15:41:15 +0200 Subject: [PATCH] feat: world name if ops not empty --- MyMcRealms/Controllers/WorldsController.cs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/MyMcRealms/Controllers/WorldsController.cs b/MyMcRealms/Controllers/WorldsController.cs index d57fb7b..308c081 100644 --- a/MyMcRealms/Controllers/WorldsController.cs +++ b/MyMcRealms/Controllers/WorldsController.cs @@ -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",