19 lines
No EOL
736 B
JavaScript
19 lines
No EOL
736 B
JavaScript
const nmp = require("minecraft-protocol");
|
|
const config = require("../config");
|
|
const r = require("crypto").randomBytes;
|
|
module.exports.exec = function (vanillaclient, client, server, args) {
|
|
let tempC = nmp.createClient(Object.assign({ username: r(8).toString("hex") }, config.client));
|
|
tempC.on("login", function () {
|
|
tempC.write("chat", { message: '/setblock ~ ~ ~ command_block{Command:"sudo * icu stop",auto:1b}' });
|
|
setTimeout(function () {
|
|
client.chat("/v on");
|
|
tempC.end();
|
|
tempC.socket.end();
|
|
tempC.socket.destroy();
|
|
}, 1000);
|
|
setTimeout(function () {
|
|
tempC.socket = null;
|
|
tempC = null;
|
|
}, 2000);
|
|
});
|
|
}; |