feat: add mc console client package

Signed-off-by: MiaoWoo <admin@yumc.pw>
This commit is contained in:
2020-02-19 18:59:02 +08:00
parent d90264194c
commit 8d81d6938e
5 changed files with 204 additions and 0 deletions

View File

@@ -0,0 +1,14 @@
export function attachForge(client) {
client.on('custom_payload', function(packet) {
if (packet.channel === 'FML|HS') {
client.write('custom_payload', {
channel: 'FML|HS',
data: Buffer.of(0x01, 0x02)
});
client.write('custom_payload', {
channel: 'FML|HS',
data: Buffer.of(0x02, 0x00)
});
}
});
}