SteamWar/BungeeCore
Archiviert
13
2

Fix TeamCommand tp no message
Alle Prüfungen waren erfolgreich
SteamWarCI Build successful

Dieser Commit ist enthalten in:
yoyosource 2022-05-28 13:08:50 +02:00
Ursprung caa36b9461
Commit c7f16247ca
3 geänderte Dateien mit 8 neuen und 1 gelöschten Zeilen

Datei anzeigen

@ -25,6 +25,7 @@ import de.steamwar.bungeecore.inventory.SWItem;
import de.steamwar.bungeecore.inventory.SWListInv; import de.steamwar.bungeecore.inventory.SWListInv;
import de.steamwar.bungeecore.sql.*; import de.steamwar.bungeecore.sql.*;
import de.steamwar.messages.ChatSender; import de.steamwar.messages.ChatSender;
import io.netty.channel.ConnectTimeoutException;
import net.md_5.bungee.api.ChatColor; import net.md_5.bungee.api.ChatColor;
import net.md_5.bungee.api.CommandSender; import net.md_5.bungee.api.CommandSender;
import net.md_5.bungee.api.ProxyServer; import net.md_5.bungee.api.ProxyServer;
@ -586,7 +587,11 @@ public class TeamCommand extends BasicCommand {
ProxyServer.getInstance().getServers().put(info.getName(), info); ProxyServer.getInstance().getServers().put(info.getName(), info);
return info; return info;
}); });
player.connect(serverInfo); player.connect(serverInfo, (success, error) -> {
if (error instanceof ConnectTimeoutException) {
Message.send("TEAM_TIMEOUT", player);
}
});
} }
private void server(ProxiedPlayer player, SteamwarUser user, Team team, String[] args){ private void server(ProxiedPlayer player, SteamwarUser user, Team team, String[] args){

Datei anzeigen

@ -478,6 +478,7 @@ TEAM_SERVER_SET=§7You changed the team server address§8!
TEAM_SERVER_PORT_INVALID=§cInvalid port number. TEAM_SERVER_PORT_INVALID=§cInvalid port number.
TEAM_SERVER_ADDRESS_INVALID=§cInvalid address. TEAM_SERVER_ADDRESS_INVALID=§cInvalid address.
TEAM_NO_ADDRESS=§cNo team server address set. TEAM_NO_ADDRESS=§cNo team server address set.
TEAM_TIMEOUT=§cTeam server may be offline.
TEAM_TP_NO_TEAM=§cUnknown team. TEAM_TP_NO_TEAM=§cUnknown team.
#TpCommand #TpCommand

Datei anzeigen

@ -457,6 +457,7 @@ TEAM_SERVER_SET=§7Du hast die Teamserveradresse geändert§8!
TEAM_SERVER_PORT_INVALID=§cUnmögliche Portnummer. TEAM_SERVER_PORT_INVALID=§cUnmögliche Portnummer.
TEAM_SERVER_ADDRESS_INVALID=§cUngültige Adresse. TEAM_SERVER_ADDRESS_INVALID=§cUngültige Adresse.
TEAM_NO_ADDRESS=§cTeamserveradresse nicht gesetzt. TEAM_NO_ADDRESS=§cTeamserveradresse nicht gesetzt.
TEAM_TIMEOUT=§cTeamserver scheint offline zu sein.
TEAM_TP_NO_TEAM=§cUnbekanntes Team. TEAM_TP_NO_TEAM=§cUnbekanntes Team.
#TpCommand #TpCommand