mirror of
https://github.com/SerendipityR-2022/EndMinecraftPlusV2.git
synced 2024-10-31 20:08:00 +00:00
修复某些情况下发送注册信息失败
This commit is contained in:
parent
bf878356d9
commit
ab4077b1a6
@ -26,6 +26,7 @@ import com.github.steveice10.packetlib.event.session.*;
|
||||
import com.github.steveice10.packetlib.packet.Packet;
|
||||
import com.github.steveice10.packetlib.tcp.TcpSessionFactory;
|
||||
import io.netty.util.internal.ConcurrentSet;
|
||||
import sun.rmi.runtime.Log;
|
||||
|
||||
import java.io.InputStream;
|
||||
import java.io.OutputStream;
|
||||
@ -102,8 +103,8 @@ public class BotAttack extends IAttack {
|
||||
} else if (c.getSession().hasFlag("join")) {
|
||||
if (ConfigUtil.RegisterAndLogin) {
|
||||
for (String cmd:ConfigUtil.RegisterCommands) {
|
||||
c.getSession().send(new ClientChatPacket(cmd.replace("$pwd",DataUtil.botRegPasswordsMap.get(clientName.get(c)))));
|
||||
OtherUtils.doSleep(ConfigUtil.ChatDelay);
|
||||
c.getSession().send(new ClientChatPacket(cmd.replace("$pwd",DataUtil.botRegPasswordsMap.get(clientName.get(c)))));
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -133,6 +133,8 @@ public class NewBotAttack extends IAttack {
|
||||
} else if (c.hasFlag("join")) {
|
||||
if (ConfigUtil.RegisterAndLogin) {
|
||||
for (String cmd:ConfigUtil.RegisterCommands) {
|
||||
OtherUtils.doSleep(ConfigUtil.ChatDelay);
|
||||
|
||||
if (ProtocolLibs.adaptAfter760) {
|
||||
VersionSupport760.sendChatPacket(c, cmd.replace("$pwd",DataUtil.botRegPasswordsMap.get(clientName.get(c))));
|
||||
} else if (ProtocolLibs.adaptAfter759) {
|
||||
@ -142,8 +144,6 @@ public class NewBotAttack extends IAttack {
|
||||
} else {
|
||||
c.send(new ClientChatPacket(cmd.replace("$pwd",DataUtil.botRegPasswordsMap.get(clientName.get(c)))));
|
||||
}
|
||||
|
||||
OtherUtils.doSleep(ConfigUtil.ChatDelay);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -104,11 +104,13 @@ public class BotAttack extends IAttack {
|
||||
} else if (c.getSession().hasFlag("join")) {
|
||||
if (ConfigUtil.RegisterAndLogin) {
|
||||
for (String cmd:ConfigUtil.RegisterCommands) {
|
||||
c.getSession().send(new ClientChatPacket(cmd.replace("$pwd",DataUtil.botRegPasswordsMap.get(clientName.get(c)))));
|
||||
OtherUtils.doSleep(ConfigUtil.ChatDelay);
|
||||
c.getSession().send(new ClientChatPacket(cmd.replace("$pwd",DataUtil.botRegPasswordsMap.get(clientName.get(c)))));
|
||||
}
|
||||
}
|
||||
|
||||
LogUtil.doLog(0, "[" + clientName.get(c) + "] 注册信息已发送。", "BotAttack");
|
||||
|
||||
c.getSession().setFlag("login", true);
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user