generateCmdID when status equal GET
parent
6aa1446a20
commit
a56977bcac
|
@ -1,6 +1,7 @@
|
||||||
package net.krakatoa.proxy.command;
|
package net.krakatoa.proxy.command;
|
||||||
|
|
||||||
import earth.krakatao.protocol.KraSocketClientProtocolMessage;
|
import earth.krakatao.protocol.KraSocketClientProtocolMessage;
|
||||||
|
import earth.krakatao.protocol.KraSocketClientProtocolStatus;
|
||||||
import net.krakatoa.proxy.ProxySystem;
|
import net.krakatoa.proxy.ProxySystem;
|
||||||
import net.md_5.bungee.api.CommandSender;
|
import net.md_5.bungee.api.CommandSender;
|
||||||
import net.md_5.bungee.api.chat.TextComponent;
|
import net.md_5.bungee.api.chat.TextComponent;
|
||||||
|
@ -21,8 +22,16 @@ public class SendTestMessageCommand extends Command {
|
||||||
// /sendTestMessage <status> <cmdID> <dest> <cmdNumber> <msg>
|
// /sendTestMessage <status> <cmdID> <dest> <cmdNumber> <msg>
|
||||||
|
|
||||||
if (args.length == 5) {
|
if (args.length == 5) {
|
||||||
|
int cmdID;
|
||||||
|
|
||||||
|
if (Byte.parseByte(args[0]) == KraSocketClientProtocolStatus.GET.getStatus()) {
|
||||||
|
cmdID = ProxySystem.getInstance().getKraSocketClientProtocol().generateCmdID();
|
||||||
|
} else {
|
||||||
|
cmdID = Byte.parseByte(args[0]);
|
||||||
|
}
|
||||||
|
|
||||||
KraSocketClientProtocolMessage kraSocketClientProtocolMessage = new KraSocketClientProtocolMessage(
|
KraSocketClientProtocolMessage kraSocketClientProtocolMessage = new KraSocketClientProtocolMessage(
|
||||||
Byte.parseByte(args[0]), Integer.parseInt(args[1]), Integer.parseInt(args[2]),
|
(byte) cmdID, Integer.parseInt(args[1]), Integer.parseInt(args[2]),
|
||||||
proxiedPlayer.getUniqueId().toString(), Short.parseShort(args[3]), args[4]);
|
proxiedPlayer.getUniqueId().toString(), Short.parseShort(args[3]), args[4]);
|
||||||
|
|
||||||
ProxySystem.getInstance().getKraSocketClient().getSocketClient()
|
ProxySystem.getInstance().getKraSocketClient().getSocketClient()
|
||||||
|
|
Loading…
Reference in New Issue