Dieser Commit ist enthalten in:
Ursprung
f45ed11a59
Commit
300a2ef502
@ -88,6 +88,7 @@ public class ErrorLogger extends Handler {
|
||||
contains.add("read timed out");
|
||||
contains.add("Connection reset by peer");
|
||||
contains.add("No client connected for pending server");
|
||||
contains.add("Error occurred processing connection for");
|
||||
ignoreContains = Collections.unmodifiableList(contains);
|
||||
}
|
||||
}
|
||||
|
@ -26,6 +26,8 @@ import de.steamwar.bungeecore.inventory.SWListInv;
|
||||
import de.steamwar.bungeecore.sql.*;
|
||||
import de.steamwar.messages.ChatSender;
|
||||
import io.netty.channel.ConnectTimeoutException;
|
||||
import net.md_5.bungee.BungeeCord;
|
||||
import net.md_5.bungee.UserConnection;
|
||||
import net.md_5.bungee.api.ChatColor;
|
||||
import net.md_5.bungee.api.CommandSender;
|
||||
import net.md_5.bungee.api.ProxyServer;
|
||||
@ -35,6 +37,7 @@ import net.md_5.bungee.api.chat.HoverEvent;
|
||||
import net.md_5.bungee.api.chat.TextComponent;
|
||||
import net.md_5.bungee.api.config.ServerInfo;
|
||||
import net.md_5.bungee.api.connection.ProxiedPlayer;
|
||||
import net.md_5.bungee.api.event.ServerConnectEvent;
|
||||
|
||||
import java.net.*;
|
||||
import java.time.Instant;
|
||||
@ -587,18 +590,13 @@ public class TeamCommand extends BasicCommand {
|
||||
ProxyServer.getInstance().getServers().put(info.getName(), info);
|
||||
return info;
|
||||
});
|
||||
try {
|
||||
player.connect(serverInfo, (success, error) -> {
|
||||
if (error != null) {
|
||||
error.printStackTrace();
|
||||
}
|
||||
if (error instanceof ConnectTimeoutException) {
|
||||
Message.send("TEAM_TIMEOUT", player);
|
||||
}
|
||||
});
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
((UserConnection) player).connect(serverInfo, (success, error) -> {
|
||||
if (error instanceof ConnectTimeoutException) {
|
||||
Message.send("TEAM_TIMEOUT", player);
|
||||
} else if (error != null) {
|
||||
Message.send("TEAM_UNKNOWN", player);
|
||||
}
|
||||
}, false, ServerConnectEvent.Reason.PLUGIN, BungeeCord.getInstance().getConfig().getServerConnectTimeout(), false);
|
||||
}
|
||||
|
||||
private void server(ProxiedPlayer player, SteamwarUser user, Team team, String[] args){
|
||||
|
@ -479,6 +479,7 @@ 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_TP_NO_TEAM=§cUnknown team.
|
||||
|
||||
#TpCommand
|
||||
|
@ -458,6 +458,7 @@ 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_UNKNOWN=§cEin unwerwarteter Fehler ist aufgetreten beim verbinden zum Teamserver.
|
||||
TEAM_TP_NO_TEAM=§cUnbekanntes Team.
|
||||
|
||||
#TpCommand
|
||||
|
In neuem Issue referenzieren
Einen Benutzer sperren