fix digit button for hotbar

This commit is contained in:
Romain Beaumont 2021-03-14 19:49:49 +01:00 committed by GitHub
parent 77fa0ee0cd
commit f0294abf9e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -196,7 +196,7 @@ async function connect (options) {
}
if (e.code.startsWith('Digit')) {
const numPressed = e.code.substr(5)
hotbar.reloadHotbarSelected(bot, numPressed - 1)
hotbar.reloadHotbarSelected(numPressed - 1)
}
if (e.code === 'KeyQ') {
if (bot.heldItem) bot.tossStack(bot.heldItem)