We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 1d46161 commit d00c386Copy full SHA for d00c386
lib/plugins/inventory.js
@@ -691,6 +691,13 @@ function inject (bot, { hideErrors }) {
691
bot.currentWindow = null
692
bot.emit('windowClose', oldWindow)
693
})
694
+ bot._client.on('login', () => {
695
+ // close window when switch subserver
696
+ const oldWindow = bot.currentWindow
697
+ if (!oldWindow) return
698
+ bot.currentWindow = null
699
+ bot.emit('windowClose', oldWindow)
700
+ })
701
bot._client.on('set_slot', (packet) => {
702
// set slot
703
const window = packet.windowId === 0 ? bot.inventory : bot.currentWindow
0 commit comments