prismarine-viewer icon indicating copy to clipboard operation
prismarine-viewer copied to clipboard

Question: How to Close the Viewer?

Open BlackAsLight opened this issue 3 years ago • 3 comments

Hello, so I'm having trouble figuring out how to close the mineflayerViewer.

The reason I want to close it, is because the example on reconnecting when you get disconnected from the server, for whatever reason, is to make a new bot. Which I can do, but the mineflayerViewer doesn't follow that new bot so I need a way to close it to make a new mineflayerViewer on the same port. Or a way to assign it a new bot.

BlackAsLight avatar Feb 05 '22 07:02 BlackAsLight

what about implementing moving the bot in mineflayerViewer instead?

rom1504 avatar Feb 06 '22 02:02 rom1504

I don't understand what you mean. The example in the main mineflayer repo says that to reconnect to a server you should create a new bot. The mineflayerViewer doesn't follow this new bot and the old one is no more. I'm looking for a way to tell it to follow this new bot, or close it down so I can open up a new one on the same port with the new bot provided.

BlackAsLight avatar Feb 06 '22 10:02 BlackAsLight

I think

bot.viewer.close()

amoraschi avatar Mar 12 '22 08:03 amoraschi