I am currently using mineflayer and mineflayer-gui to try join housings in Hypixel by typing /lobby housing, /visit <Username>, and then using mineflayer-gui to find the position of heads, and click the first one. Heres what I got so far:
const mineflayer = require('mineflayer')
const gui = require("mineflayer-gui");
const bot = mineflayer.createBot({
host: 'mc.hypixel.net',
username: '<Email>',
password: '<Password>',
port: 25565,
version: "1.8.9",
auth: 'microsoft'
})
bot.loadPlugin(gui.plugin)
var house = "<Username>";
bot.on("spawn", async () => {
bot.chat("/lobby housing")
bot.chat("/visit "+house)
let window = null;
await bot.once("windowOpen", response => window = response);
let options = {
window,
}
let heads = await bot.gui.getItems(options, "player_head")
let usernames = heads.map(item => bot.gui.item.getName(item).toString());
console.log(usernames)
})
This code produces no errors, but it logs an empty list? I have made sure the username (house variable) I put is valid, yet there is no even 1 head shown? Can someone let me know what I did wrong?
btw, I would also like the know how to turn off warnings, since when I join Hypixel, it floods my console with warnings. Thanks so much!