From 443a1b29c96c32b54d484706edbba8309fa052c5 Mon Sep 17 00:00:00 2001 From: yoyosource Date: Fri, 19 Jan 2024 16:30:47 +0100 Subject: [PATCH] Fix messages Fix ServerStarter condition --- src/de/steamwar/bungeecore/ServerStarter.java | 4 +++- src/de/steamwar/messages/BungeeCore.properties | 11 ++++++----- src/de/steamwar/messages/BungeeCore_de.properties | 11 ++++++----- 3 files changed, 15 insertions(+), 11 deletions(-) diff --git a/src/de/steamwar/bungeecore/ServerStarter.java b/src/de/steamwar/bungeecore/ServerStarter.java index e2ab6079..371045b6 100644 --- a/src/de/steamwar/bungeecore/ServerStarter.java +++ b/src/de/steamwar/bungeecore/ServerStarter.java @@ -127,7 +127,6 @@ public class ServerStarter { startCondition = () -> { boolean atLeastOneSupervisor = playersToSend.stream().anyMatch(player -> { BauweltMember bauweltMember = BauweltMember.getBauMember(owner, player.getUniqueId()); - if (bauweltMember == null) return false; return bauweltMember.isSupervisor() || player.getUniqueId().equals(owner); }); for(Subserver subserver : Subserver.getServerList()) { @@ -135,6 +134,9 @@ public class ServerStarter { if (!subserver.getServer().getPlayers().isEmpty() || atLeastOneSupervisor) { for(ProxiedPlayer p : playersToSend) SubserverSystem.sendPlayer(subserver, p); + } else { + for(ProxiedPlayer p : playersToSend) + ChatSender.of(p).system("BAU_JOIN_NOT_ALLOWED"); } return false; } diff --git a/src/de/steamwar/messages/BungeeCore.properties b/src/de/steamwar/messages/BungeeCore.properties index 05b8528e..08a8ba13 100644 --- a/src/de/steamwar/messages/BungeeCore.properties +++ b/src/de/steamwar/messages/BungeeCore.properties @@ -227,12 +227,13 @@ BAU_DELETE_GUI_DELETE=§aDelete BAU_START_ALREADY=§cThis server is already starting. BAU_MEMBER_NOMEMBER=§cThis player is no member of your world! BAU_MEMBER_SET_USAGE=§8/§7build {0} §8[§eplayer§8] -BAU_MEMBER_SET_TARGET=§aYou are now §a{1}§e on the world of §e{0}. -BAU_MEMBER_SET=§aThe player is now {0}. -BAU_MEMBER_SET_SPECTATOR = a spectator -BAU_MEMBER_SET_BUILDER = a builder -BAU_MEMBER_SET_SUPERVISOR = a supervisor +BAU_MEMBER_SET_TARGET=§7You are now a §e{1}§7 on the world of §e{0}§7. +BAU_MEMBER_SET=§7The player is now a §e{0}§7. +BAU_MEMBER_SET_SPECTATOR = spectator +BAU_MEMBER_SET_BUILDER = builder +BAU_MEMBER_SET_SUPERVISOR = supervisor BAU_START_NOT_ALLOWED = §cYou are not allowed to start this build server +BAU_JOIN_NOT_ALLOWED = §cYou are not allowed to join this build server. No supervisor is present. #ChallengeCommand CHALLENGE_USAGE=§8/§7challenge §8[§eplayer§8] diff --git a/src/de/steamwar/messages/BungeeCore_de.properties b/src/de/steamwar/messages/BungeeCore_de.properties index 043b1fe9..44d6f928 100644 --- a/src/de/steamwar/messages/BungeeCore_de.properties +++ b/src/de/steamwar/messages/BungeeCore_de.properties @@ -210,12 +210,13 @@ BAU_DELETE_GUI_DELETE=§aLöschen BAU_START_ALREADY=§cDer Server startet bereits. BAU_MEMBER_NOMEMBER=§cDer Spieler ist kein Mitglied deiner Welt! BAU_MEMBER_SET_USAGE=§8/§7bau {0} §8[§eSpieler§8] -BAU_MEMBER_SET_TARGET=§aDu bist nun {1} auf der Welt von §e{0}§a. -BAU_MEMBER_SET=§aDer Spieler ist nun {0}. -BAU_MEMBER_SET_SPECTATOR = ein Zuschauer -BAU_MEMBER_SET_BUILDER = ein Builder -BAU_MEMBER_SET_SUPERVISOR = ein Supervisor +BAU_MEMBER_SET_TARGET=§7Du bist nun ein §e{1}§7 auf der Welt von §e{0}§7. +BAU_MEMBER_SET=§7Der Spieler ist nun §e{0}§7. +BAU_MEMBER_SET_SPECTATOR = Zuschauer +BAU_MEMBER_SET_BUILDER = Builder +BAU_MEMBER_SET_SUPERVISOR = Supervisor BAU_START_NOT_ALLOWED = §cDu darfst diesen Bauserver nicht starten +BAU_JOIN_NOT_ALLOWED = §cDu darfst diesen Bauserver nicht betreten. Kein Supervisor auf dem Server. #ChallengeCommand CHALLENGE_USAGE=§8/§7challenge §8[§eSpieler§8]