From 83bcdd34bf9385da16ee4384bb6abf046e07c2c2 Mon Sep 17 00:00:00 2001 From: Zeanon Date: Tue, 18 May 2021 18:08:25 +0200 Subject: [PATCH] rework in persistent bungeecore for said issue --- src/de/steamwar/bungeecore/commands/BauCommand.java | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/de/steamwar/bungeecore/commands/BauCommand.java b/src/de/steamwar/bungeecore/commands/BauCommand.java index c090a5b..8d63132 100644 --- a/src/de/steamwar/bungeecore/commands/BauCommand.java +++ b/src/de/steamwar/bungeecore/commands/BauCommand.java @@ -221,8 +221,7 @@ public class BauCommand { ProxiedPlayer z = ProxyServer.getInstance().getPlayer(SteamwarUser.get(target.getMemberID()).getUuid()); if(z != null){ Message.send("BAU_DELMEMBER_DELETED_TARGET", z, p.getName()); - Collection servers = Subserver.getAllServers(z); - if (!servers.isEmpty() && servers.stream().filter(server -> server.getType() == Servertype.BAUSERVER).anyMatch(server -> ((Bauserver) server).getOwner().equals(p.getUniqueId()))) { + if (Subserver.getServerList().stream().filter(server -> server.onServer(p) && server.getType() == Servertype.BAUSERVER).anyMatch(server -> ((Bauserver) server).getOwner().equals(p.getUniqueId()))) { z.connect(ProxyServer.getInstance().getServerInfo(BungeeCore.LOBBY_SERVER)); } }