fix SendTestMessageCommand
parent
70752bfb4f
commit
09e715a449
|
@ -24,14 +24,16 @@ public class SendTestMessageCommand extends Command {
|
|||
if (args.length == 5) {
|
||||
int cmdID;
|
||||
|
||||
if (Byte.parseByte(args[0]) == KraSocketClientProtocolStatus.GET.getStatus()) {
|
||||
byte status = Byte.parseByte(args[0]);
|
||||
|
||||
if (status == KraSocketClientProtocolStatus.GET.getStatus()) {
|
||||
cmdID = ProxySystem.getInstance().getKraSocketClientProtocol().generateCmdID();
|
||||
} else {
|
||||
cmdID = Byte.parseByte(args[0]);
|
||||
cmdID = Byte.parseByte(args[1]);
|
||||
}
|
||||
|
||||
KraSocketClientProtocolMessage kraSocketClientProtocolMessage = new KraSocketClientProtocolMessage(
|
||||
(byte) cmdID, Integer.parseInt(args[1]), Integer.parseInt(args[2]),
|
||||
status, (byte) cmdID, Integer.parseInt(args[2]),
|
||||
proxiedPlayer.getUniqueId().toString(), Short.parseShort(args[3]), args[4]);
|
||||
|
||||
ProxySystem.getInstance().getKraSocketClient().getSocketClient()
|
||||
|
|
|
@ -47,7 +47,6 @@ public class SocketClientMessageListener implements KraSocketClientEventInterfac
|
|||
.containsKey(kraProtocolMessage.getCmdID())) {
|
||||
Consumer<KraSocketClientProtocolMessage> consumer = ProxySystem.getInstance()
|
||||
.getKraSocketClientProtocol().getConsumerHashMap().get(kraProtocolMessage.getCmdID());
|
||||
|
||||
if (consumer != null) {
|
||||
ProxySystem.getInstance().getLogger()
|
||||
.info("accept " + kraProtocolMessage.getCmdID());
|
||||
|
|
Loading…
Reference in New Issue