Skip to content

Commit 062115c

Browse files
authored
feat: try to bring tab attention or focus it when you are finally joined the server
1 parent 41684bc commit 062115c

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

src/index.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -685,6 +685,7 @@ async function connect (connectOptions: ConnectOptions) {
685685
const spawnEarlier = !singleplayer && !p2pMultiplayer
686686
// don't use spawn event, player can be dead
687687
bot.once(spawnEarlier ? 'forcedMove' : 'health', () => {
688+
window.focus?.()
688689
errorAbortController.abort()
689690
const mcData = MinecraftData(bot.version)
690691
window.PrismarineBlock = PrismarineBlock(mcData.version.minecraftVersion!)

0 commit comments

Comments
 (0)