mirror of
https://github.com/ChomeNS/chomens-bot-mc.git
synced 2024-11-30 10:56: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-next-line no-unused-vars
|
||||
const mcData = require('minecraft-data')('1.18.2');
|
||||
module.exports = {
|
||||
name: 'entity',
|
||||
alias: [],
|
||||
|
@ -8,6 +6,9 @@ module.exports = {
|
|||
usage: '[specific] <player>',
|
||||
trusted: 0,
|
||||
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!');
|
||||
// if (!args[0]) return;
|
||||
// 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 crypto = require('crypto');
|
||||
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 generateEaglerUsername = require('./util/generateEaglerUsername');
|
||||
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`);
|
||||
channel.send(`Connecting to: \`${bot.options.host}:${bot.options.port}\`...`);
|
||||
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}`);
|
||||
// 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}\``);
|
||||
bot.uuid = bot._client.uuid;
|
||||
bot.username = bot._client.username;
|
||||
bot.entityId = data.entityId;
|
||||
bot.version = bot._client.version;
|
||||
previusMessage = undefined;
|
||||
loginfinish = false;
|
||||
started = false;
|
||||
|
|
|
@ -2,9 +2,9 @@
|
|||
/* eslint-disable require-jsdoc */
|
||||
// eslint-disable-next-line no-undef
|
||||
// const parse = require('../util/text_parser');
|
||||
const ChatMessage = require('prismarine-chat')('1.18.2');
|
||||
|
||||
function inject(bot) {
|
||||
const ChatMessage = require('prismarine-chat')(bot.version);
|
||||
|
||||
bot._client.on('chat', async (packet) => {
|
||||
try {
|
||||
// const message = parse(packet.message);
|
||||
|
|
Loading…
Reference in a new issue