From 86530eacf5ce75f88f88638865aec13e3e5d3228 Mon Sep 17 00:00:00 2001 From: yoyosource Date: Sat, 28 May 2022 13:32:12 +0200 Subject: [PATCH] Fix TeamCommand better message --- src/de/steamwar/bungeecore/commands/TeamCommand.java | 6 ++---- src/de/steamwar/messages/BungeeCore.properties | 3 +-- src/de/steamwar/messages/BungeeCore_de.properties | 2 +- 3 files changed, 4 insertions(+), 7 deletions(-) diff --git a/src/de/steamwar/bungeecore/commands/TeamCommand.java b/src/de/steamwar/bungeecore/commands/TeamCommand.java index ab242a6..bde57e0 100644 --- a/src/de/steamwar/bungeecore/commands/TeamCommand.java +++ b/src/de/steamwar/bungeecore/commands/TeamCommand.java @@ -591,10 +591,8 @@ public class TeamCommand extends BasicCommand { return info; }); ((UserConnection) player).connect(serverInfo, (success, error) -> { - if (error instanceof ConnectTimeoutException) { - Message.send("TEAM_TIMEOUT", player); - } else if (error != null) { - Message.send("TEAM_UNKNOWN", player); + if (error != null) { + Message.send("TEAM_OFFLINE", player); } }, false, ServerConnectEvent.Reason.PLUGIN, BungeeCord.getInstance().getConfig().getServerConnectTimeout(), false); } diff --git a/src/de/steamwar/messages/BungeeCore.properties b/src/de/steamwar/messages/BungeeCore.properties index 304f488..a71a2b9 100644 --- a/src/de/steamwar/messages/BungeeCore.properties +++ b/src/de/steamwar/messages/BungeeCore.properties @@ -478,8 +478,7 @@ TEAM_SERVER_SET=§7You changed the team server address§8! TEAM_SERVER_PORT_INVALID=§cInvalid port number. TEAM_SERVER_ADDRESS_INVALID=§cInvalid address. TEAM_NO_ADDRESS=§cNo team server address set. -TEAM_TIMEOUT=§cTeam server may be offline. -TEAM_UNKNOWN=§cAn unexpected error occurred while connecting to the team server. +TEAM_OFFLINE=§cTeam server may be offline. TEAM_TP_NO_TEAM=§cUnknown team. #TpCommand diff --git a/src/de/steamwar/messages/BungeeCore_de.properties b/src/de/steamwar/messages/BungeeCore_de.properties index 5274ac9..830ae45 100644 --- a/src/de/steamwar/messages/BungeeCore_de.properties +++ b/src/de/steamwar/messages/BungeeCore_de.properties @@ -457,7 +457,7 @@ TEAM_SERVER_SET=§7Du hast die Teamserveradresse geändert§8! TEAM_SERVER_PORT_INVALID=§cUnmögliche Portnummer. TEAM_SERVER_ADDRESS_INVALID=§cUngültige Adresse. TEAM_NO_ADDRESS=§cTeamserveradresse nicht gesetzt. -TEAM_TIMEOUT=§cTeamserver scheint offline zu sein. +TEAM_OFFLINE=§cTeamserver scheint offline zu sein. TEAM_UNKNOWN=§cEin unwerwarteter Fehler ist aufgetreten beim verbinden zum Teamserver. TEAM_TP_NO_TEAM=§cUnbekanntes Team.