Bridge-protocol: пакет отправки комманд
This commit is contained in:
@@ -1,5 +1,5 @@
|
|||||||
group = 'asys'
|
group = 'asys'
|
||||||
version = '0.3.1-SNAPSHOT'
|
version = '0.4-SNAPSHOT'
|
||||||
|
|
||||||
task jar(type: Jar, overwrite: true) {
|
task jar(type: Jar, overwrite: true) {
|
||||||
// не собирать jar
|
// не собирать jar
|
||||||
|
|||||||
@@ -0,0 +1,32 @@
|
|||||||
|
/*
|
||||||
|
* DmitriyMX <d.mihailov@samson-rus.com>
|
||||||
|
* 2017-06-05
|
||||||
|
*/
|
||||||
|
package asys.mcsmanager.packets;
|
||||||
|
|
||||||
|
import io.netty.buffer.ByteBuf;
|
||||||
|
|
||||||
|
public class SC_Command extends Packet {
|
||||||
|
private String command;
|
||||||
|
|
||||||
|
public SC_Command() {
|
||||||
|
}
|
||||||
|
|
||||||
|
public SC_Command(String command) {
|
||||||
|
this.command = command;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getCommand() {
|
||||||
|
return command;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void readSelfData(ByteBuf buffer) {
|
||||||
|
command = readString(buffer);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void writeSelfData(ByteBuf buffer) {
|
||||||
|
writeString(buffer, command);
|
||||||
|
}
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user