1
1
mirror of https://github.com/CyberL1/MyMcRealms.git synced 2024-12-24 21:38:23 -05:00

feat: server owners

This commit is contained in:
CyberL1 2024-05-13 14:08:44 +02:00
parent 4f5a5fa724
commit 2635e07951
2 changed files with 20 additions and 11 deletions

View File

@ -37,8 +37,8 @@ namespace MyMcRealms.Controllers
WorldResponse response = new()
{
Id = AllServers.Servers.IndexOf(world),
Owner = "Owner",
OwnerUUID = "069a79f444e94726a5befca90e38aaf5",
Owner = world.Ops[0].Name,
OwnerUUID = world.Ops[0].Uuid,
Name = world.ServerName,
Motd = world.Motd,
State = isCompatibleOnOlderVersions,

View File

@ -3,7 +3,7 @@
public class AllServersResponse
{
public bool Success { get; set; }
public List<Server> Servers { get; set; }
public List<Server> Servers { get; set; } = null!;
}
public class Server
@ -13,15 +13,8 @@
public string GameVersion { get; set; } = string.Empty;
public string Motd { get; set; } = string.Empty;
public bool Online { get; set; }
public List<UserCache> UserCache { get; set; } = null!;
public List<Op> Ops { get; set; } = null!;
}
public class UserCache
{
public string Name { get; set; } = null!;
public string Uuid { get; set; } = null!;
public string ExpiresOn { get; set; } = null!;
public List<Ban> Banlist { get; set; }
}
public class Op
@ -31,4 +24,20 @@
public int Level { get; set; }
public bool BypassesPlayerLimit { get; set; }
}
public class Ban
{
public string Uuid { get; set; } = null!;
public string Name { get; set; } = null!;
public string Created { get; set; } = null!;
public string Source { get; set; } = null!;
public string Expires { get; set; } = null!;
public string Reason { get; set; } = null!;
}
public class Whitelist
{
public string Uuid { get; set; } = null!;
public string Name { get; set; } = null!;
}
}