mirror of
https://github.com/ChomeNS/chomens-bot-mc.git
synced 2024-11-14 18:54:55 -05:00
use bot.version
This commit is contained in:
parent
6e5af6a60b
commit
be57d2caf2
3 changed files with 8 additions and 6 deletions
|
@ -1,6 +1,4 @@
|
||||||
/* eslint-disable max-len */
|
/* eslint-disable max-len */
|
||||||
// eslint-disable-next-line no-unused-vars
|
|
||||||
const mcData = require('minecraft-data')('1.18.2');
|
|
||||||
module.exports = {
|
module.exports = {
|
||||||
name: 'entity',
|
name: 'entity',
|
||||||
alias: [],
|
alias: [],
|
||||||
|
@ -8,6 +6,9 @@ module.exports = {
|
||||||
usage: '[specific] <player>',
|
usage: '[specific] <player>',
|
||||||
trusted: 0,
|
trusted: 0,
|
||||||
execute: function(bot, username, usernameraw, sender, prefix, args) {
|
execute: function(bot, username, usernameraw, sender, prefix, args) {
|
||||||
|
// eslint-disable-next-line no-unused-vars
|
||||||
|
const mcData = require('minecraft-data')(bot.version);
|
||||||
|
|
||||||
throw new Error('Execute Bypass is patched so this command will be broken for now!');
|
throw new Error('Execute Bypass is patched so this command will be broken for now!');
|
||||||
// if (!args[0]) return;
|
// if (!args[0]) return;
|
||||||
// const entity = mcData.entitiesByName[args[0]];
|
// const entity = mcData.entitiesByName[args[0]];
|
||||||
|
|
5
index.js
5
index.js
|
@ -8,8 +8,6 @@ const mc = require('minecraft-protocol');
|
||||||
const config = require('./config');
|
const config = require('./config');
|
||||||
const crypto = require('crypto');
|
const crypto = require('crypto');
|
||||||
const colorConvert = require('color-convert');
|
const colorConvert = require('color-convert');
|
||||||
const chatMessage = require('prismarine-chat')('1.18.2');
|
|
||||||
const mcData = require('minecraft-data')('1.18.2');
|
|
||||||
const {containsIllegalCharacters} = require('./util/containsIllegalCharacters');
|
const {containsIllegalCharacters} = require('./util/containsIllegalCharacters');
|
||||||
const generateEaglerUsername = require('./util/generateEaglerUsername');
|
const generateEaglerUsername = require('./util/generateEaglerUsername');
|
||||||
const {EventEmitter} = require('events');
|
const {EventEmitter} = require('events');
|
||||||
|
@ -222,12 +220,15 @@ function main() {
|
||||||
// fs.appendFileSync('./logs.txt', `\r\Connecting to: ${bot.options.host}:${bot.options.port}...\r\n`);
|
// fs.appendFileSync('./logs.txt', `\r\Connecting to: ${bot.options.host}:${bot.options.port}...\r\n`);
|
||||||
channel.send(`Connecting to: \`${bot.options.host}:${bot.options.port}\`...`);
|
channel.send(`Connecting to: \`${bot.options.host}:${bot.options.port}\`...`);
|
||||||
bot._client.on('login', async function(data) {
|
bot._client.on('login', async function(data) {
|
||||||
|
const chatMessage = require('prismarine-chat')(bot.version);
|
||||||
|
const mcData = require('minecraft-data')(bot.version);
|
||||||
console.log(`Successfully logged in to: ${bot.options.host}:${bot.options.port}`);
|
console.log(`Successfully logged in to: ${bot.options.host}:${bot.options.port}`);
|
||||||
// fs.appendFileSync('./logs.txt', `\r\nSuccessfully logged in to: ${bot.options.host}:${bot.options.port}\r\n`);
|
// fs.appendFileSync('./logs.txt', `\r\nSuccessfully logged in to: ${bot.options.host}:${bot.options.port}\r\n`);
|
||||||
channel.send(`Successfully logged in to: \`${bot.options.host}:${bot.options.port}\``);
|
channel.send(`Successfully logged in to: \`${bot.options.host}:${bot.options.port}\``);
|
||||||
bot.uuid = bot._client.uuid;
|
bot.uuid = bot._client.uuid;
|
||||||
bot.username = bot._client.username;
|
bot.username = bot._client.username;
|
||||||
bot.entityId = data.entityId;
|
bot.entityId = data.entityId;
|
||||||
|
bot.version = bot._client.version;
|
||||||
previusMessage = undefined;
|
previusMessage = undefined;
|
||||||
loginfinish = false;
|
loginfinish = false;
|
||||||
started = false;
|
started = false;
|
||||||
|
|
|
@ -2,9 +2,9 @@
|
||||||
/* eslint-disable require-jsdoc */
|
/* eslint-disable require-jsdoc */
|
||||||
// eslint-disable-next-line no-undef
|
// eslint-disable-next-line no-undef
|
||||||
// const parse = require('../util/text_parser');
|
// const parse = require('../util/text_parser');
|
||||||
const ChatMessage = require('prismarine-chat')('1.18.2');
|
|
||||||
|
|
||||||
function inject(bot) {
|
function inject(bot) {
|
||||||
|
const ChatMessage = require('prismarine-chat')(bot.version);
|
||||||
|
|
||||||
bot._client.on('chat', async (packet) => {
|
bot._client.on('chat', async (packet) => {
|
||||||
try {
|
try {
|
||||||
// const message = parse(packet.message);
|
// const message = parse(packet.message);
|
||||||
|
|
Loading…
Reference in a new issue