Hotfix TeamCommand.tp
Dieser Commit ist enthalten in:
Ursprung
ff75a43c11
Commit
4b38ed7c54
@ -515,12 +515,21 @@ public class TeamCommand extends SWCommand {
|
||||
Message.send("TEAM_NO_ADDRESS", player);
|
||||
return;
|
||||
}
|
||||
|
||||
InetSocketAddress address = new InetSocketAddress(targetTeam.getAddress(), targetTeam.getPort());
|
||||
ServerInfo serverInfo = Storage.teamServers.computeIfAbsent(targetTeam.getTeamId(), integer -> {
|
||||
InetSocketAddress address = new InetSocketAddress(targetTeam.getAddress(), targetTeam.getPort());
|
||||
ServerInfo info = ProxyServer.getInstance().constructServerInfo("Team " + targetTeam.getTeamKuerzel(), address, "SteamWar.de - Teamserver", false);
|
||||
ProxyServer.getInstance().getServers().put(info.getName(), info);
|
||||
return info;
|
||||
});
|
||||
|
||||
if (!address.equals(serverInfo.getSocketAddress())) {
|
||||
serverInfo = Storage.teamServers.remove(targetTeam.getTeamId());
|
||||
ProxyServer.getInstance().getServers().remove(serverInfo.getName());
|
||||
tp(player, targetTeam);
|
||||
return;
|
||||
}
|
||||
|
||||
player.connect(ServerConnectRequest.builder()
|
||||
.target(serverInfo)
|
||||
.connectTimeout(BungeeCord.getInstance().getConfig().getServerConnectTimeout())
|
||||
|
In neuem Issue referenzieren
Einen Benutzer sperren