Archiviert
1
0

Revert ServerStarter.builder startCondition

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
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);
if(subserver != null) {
for(ProxiedPlayer p : playersToSend)
SubserverSystem.sendPlayer(subserver, p);
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) {
for (ProxiedPlayer p : playersToSend) {
ChatSender.of(p).system("BAU_START_NOT_ALLOWED");
@ -198,12 +199,11 @@ public class ServerStarter {
// Send players to existing server
startCondition = () -> {
for(Subserver subserver : Subserver.getServerList()) {
if(subserver.getType() == Servertype.BUILDER && ((Builderserver)subserver).getMap().equals(worldName)) {
for(ProxiedPlayer p : playersToSend)
SubserverSystem.sendPlayer(subserver, p);
return false;
}
Builderserver subserver = Builderserver.get(worldName);
if (subserver != null) {
for(ProxiedPlayer p : playersToSend)
SubserverSystem.sendPlayer(subserver, p);
return false;
}
return true;
};