SteamWar/BungeeCore
Archiviert
13
2

Revert ServerStarter.builder startCondition
Einige Prüfungen sind fehlgeschlagen
SteamWarCI Build failed

Dieser Commit ist enthalten in:
yoyosource 2024-01-19 16:44:52 +01:00
Ursprung 760cf4b3b1
Commit 9688c38954

Datei anzeigen

@ -131,16 +131,17 @@ public class ServerStarter {
// Send players to existing server // Send players to existing server
startCondition = () -> { startCondition = () -> {
boolean atLeastOneSupervisor = playersToSend.stream().anyMatch(player -> {
BauweltMember bauweltMember = BauweltMember.getBauMember(owner, player.getUniqueId());
return bauweltMember.isSupervisor() || player.getUniqueId().equals(owner);
});
Bauserver subserver = Bauserver.get(owner); Bauserver subserver = Bauserver.get(owner);
if(subserver != null) { if(subserver != null) {
for(ProxiedPlayer p : playersToSend) for(ProxiedPlayer p : playersToSend)
SubserverSystem.sendPlayer(subserver, p); SubserverSystem.sendPlayer(subserver, p);
return false; return false;
} }
boolean atLeastOneSupervisor = playersToSend.stream().anyMatch(player -> {
if (player.getUniqueId().equals(owner)) return true;
BauweltMember bauweltMember = BauweltMember.getBauMember(owner, player.getUniqueId());
return bauweltMember.isSupervisor();
});
if (!atLeastOneSupervisor) { if (!atLeastOneSupervisor) {
for (ProxiedPlayer p : playersToSend) { for (ProxiedPlayer p : playersToSend) {
ChatSender.of(p).system("BAU_START_NOT_ALLOWED"); ChatSender.of(p).system("BAU_START_NOT_ALLOWED");
@ -198,12 +199,11 @@ public class ServerStarter {
// Send players to existing server // Send players to existing server
startCondition = () -> { startCondition = () -> {
for(Subserver subserver : Subserver.getServerList()) { Builderserver subserver = Builderserver.get(worldName);
if(subserver.getType() == Servertype.BUILDER && ((Builderserver)subserver).getMap().equals(worldName)) { if (subserver != null) {
for(ProxiedPlayer p : playersToSend) for(ProxiedPlayer p : playersToSend)
SubserverSystem.sendPlayer(subserver, p); SubserverSystem.sendPlayer(subserver, p);
return false; return false;
}
} }
return true; return true;
}; };