geforkt von SteamWar/BungeeCore
Revert ServerStarter.builder startCondition
Dieser Commit ist enthalten in:
Ursprung
760cf4b3b1
Commit
9688c38954
@ -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;
|
||||||
};
|
};
|
||||||
|
In neuem Issue referenzieren
Einen Benutzer sperren