Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/master'
Browse files Browse the repository at this point in the history
  • Loading branch information
github-actions[bot] committed Aug 21, 2024
2 parents 326c5a1 + d00c386 commit 5e62a83
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions lib/plugins/inventory.js
Original file line number Diff line number Diff line change
Expand Up @@ -691,6 +691,13 @@ function inject (bot, { hideErrors }) {
bot.currentWindow = null
bot.emit('windowClose', oldWindow)
})
bot._client.on('login', () => {
// close window when switch subserver
const oldWindow = bot.currentWindow
if (!oldWindow) return
bot.currentWindow = null
bot.emit('windowClose', oldWindow)
})
bot._client.on('set_slot', (packet) => {
// set slot
const window = packet.windowId === 0 ? bot.inventory : bot.currentWindow
Expand Down

0 comments on commit 5e62a83

Please sign in to comment.