Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Question: How to Close the Viewer? #245

Open
BlackAsLight opened this issue Feb 5, 2022 · 3 comments
Open

Question: How to Close the Viewer? #245

BlackAsLight opened this issue Feb 5, 2022 · 3 comments

Comments

@BlackAsLight
Copy link

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.

@rom1504
Copy link
Member

rom1504 commented Feb 6, 2022

what about implementing moving the bot in mineflayerViewer instead?

@BlackAsLight
Copy link
Author

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.

@amoraschi
Copy link

I think

bot.viewer.close()

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants