idk just put vec3 in the vm sandbox

This commit is contained in:
ChomeNS 2023-02-12 11:43:55 +07:00
parent 56b4669b15
commit cb8ce84ca2

View file

@ -9,6 +9,7 @@ const cows = require('cowsay2/cows')
const { VM } = require('vm2') const { VM } = require('vm2')
const randomstring = require('randomstring') const randomstring = require('randomstring')
const mineflayer = require('mineflayer') const mineflayer = require('mineflayer')
const Vec3 = require('vec3')
function inject (bot) { function inject (bot) {
const chatMessage = require('prismarine-chat')(bot.version) const chatMessage = require('prismarine-chat')(bot.version)
const mcData = require('minecraft-data')(bot.version) const mcData = require('minecraft-data')(bot.version)
@ -36,7 +37,8 @@ function inject (bot) {
generateEaglerUsername, generateEaglerUsername,
cowsay, cowsay,
cows, cows,
mcData mcData,
Vec3
} }
} }
bot.vm = new VM(bot.vmOptions) bot.vm = new VM(bot.vmOptions)