1
0
mirror of https://github.com/CyberL1/MyMcRealms.git synced 2024-11-24 06:58:22 -05:00

fix: do not send non-accessible servers to the player

This commit is contained in:
CyberL1 2024-10-02 20:22:02 +02:00
parent 6a7322943a
commit 88974eee33

View File

@ -24,6 +24,11 @@ namespace MyMcRealms.Controllers
foreach (var world in allServers.Servers) foreach (var world in allServers.Servers)
{ {
if (world.WhitelistEnable && !(world.Whitelist.Any(p => p.Uuid.Replace("-", "") == playerUUID) || world.Ops.Any(p => p.Uuid.Replace("-", "") == playerUUID)))
{
continue;
}
var query = new MinecraftServerQuery().Query(world.Connect); var query = new MinecraftServerQuery().Query(world.Connect);
if (query == null) continue; if (query == null) continue;