MineflayerArmorManager
MineflayerArmorManager copied to clipboard
Stops when using bot.clickWindow() or bot.closeWindow()
Info
- Stops working when using bot.clickWindow() or bot.closeWindow()
- The code below is dropping all items from inventory, and then plugin stops working
Code
var slots = bot.inventory.slots
for (var currSlot of slots) {
if (currSlot == null) continue;
bot.clickWindow(currSlot.slot, 0, 0, () => {
bot.clickWindow(-999, 0, 0)
})
bot.closeWindow(slots)
continue;
}
I'm not sure if we have this code in current version of armor manager. Are you reporting an existing issue or it's a question?
I mean, when I executing code like this, ArmorManager stops work without any errors. Yes, this is an issue.
That's interesting, thanks for reporting, I'll look into it.
I will check the code, if I find issue I try to fix it
Crap, this is coded using TypeScript
This issue seems kinda flaky, I was able to reproduce it initially but only sometimes, I've done some optimisations to handler code so try latest version and if it doesn't work, please share the exact scenario when issue is occurring(minecraft version, reproducible code and how many items bot has, what kind of item you throw at him).
Hasn't been able to reproduce it in the most recent version, please let me know if you encounter the issue again.