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

Dynamic Minecraft version / host port #321

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

Nimikita
Copy link

Added functionality such that if in settings.js:

  • If "port" is -1, the Minecraft LAN ports are scanned on the host for a LAN server.
  • If "minecraft_version" is set to "auto", it'll use the server version for mcdata and joining.

Changes:

  • Added mcserver.js, responsible for new server-related functionality. (Retrieving a valid server, pinging, and error handling.)
  • mcdata.js now exports a class with mc-related functionality.
  • Host, port, and version are now passed to agent processes and now used instead of settings.js during bot init.
  • Added better error handling for server/version issues:
    • Server not found.
    • Server is using an unsupported Minecraft version. (Then lists compatible versions from minecraft-protocol.)
    • Server doesn't use expected Minecraft version.

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

Successfully merging this pull request may close these issues.

1 participant