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 autoversion server #508

Merged
merged 2 commits into from
Jul 22, 2017
Merged

dynamic autoversion server #508

merged 2 commits into from
Jul 22, 2017

Conversation

rom1504
Copy link
Member

@rom1504 rom1504 commented Jul 21, 2017

will (finally) close #234

@rom1504 rom1504 merged commit 8cc3444 into master Jul 22, 2017
@rom1504 rom1504 deleted the dynamic_autoversion_server branch July 22, 2017 07:51
@jojomatik
Copy link
Contributor

I can't find any documentation on this feature? Is this still available if so, how can I enable it? @rom1504 maybe?

const wakeUpListener = createServer({
      port: this.port,
      "online-mode": this.properties.onlineMode,
      motd: "",
      maxPlayers: this.properties.maxPlayers,
      favicon: this.favicon,
      version: "any",
    });

This doesn't work for me, fails with:

[1] /usr/games/blockcluster/backend/node_modules/minecraft-protocol/src/createServer.js:33
2022-03-29T15:53:02.240751400Z [1]   if (!mcData) throw new Error(`unsupported protocol version: ${optVersion}`)
2022-03-29T15:53:02.240760400Z [1]                      ^
2022-03-29T15:53:02.240764000Z [1] 
2022-03-29T15:53:02.240767000Z [1] Error: unsupported protocol version: any
2022-03-29T15:53:02.240770000Z [1]     at createServer (/usr/games/blockcluster/backend/node_modules/minecraft-protocol/src/createServer.js:33:22)
2022-03-29T15:53:02.240773500Z [1]     at Server.<anonymous> (/usr/games/blockcluster/backend/dist/backend/src/components/server.js:392:74)
2022-03-29T15:53:02.240777400Z [1]     at Generator.next (<anonymous>)
2022-03-29T15:53:02.240784700Z [1]     at /usr/games/blockcluster/backend/dist/backend/src/components/server.js:44:71
2022-03-29T15:53:02.240788100Z [1]     at new Promise (<anonymous>)
2022-03-29T15:53:02.240790900Z [1]     at __awaiter (/usr/games/blockcluster/backend/dist/backend/src/components/server.js:40:12)
2022-03-29T15:53:02.240804600Z [1]     at Server.waitForConnection (/usr/games/blockcluster/backend/dist/backend/src/components/server.js:389:16)
2022-03-29T15:53:02.240811700Z [1]     at Server.<anonymous> (/usr/games/blockcluster/backend/dist/backend/src/components/server.js:382:24)
2022-03-29T15:53:02.240815100Z [1]     at Generator.next (<anonymous>)
2022-03-29T15:53:02.240817600Z [1]     at fulfilled (/usr/games/blockcluster/backend/dist/backend/src/components/server.js:41:58)

@rom1504
Copy link
Member Author

rom1504 commented Mar 29, 2022 via email

@jojomatik
Copy link
Contributor

That was fast, thanks :)

const wakeUpListener = createServer({
      port: this.port,
      "online-mode": this.properties.onlineMode,
      motd: "",
      maxPlayers: this.properties.maxPlayers,
      favicon: this.favicon,
      // eslint-disable-next-line @typescript-eslint/ban-ts-comment
      // @ts-ignore
      version: false,
    });

Minecraft still shows an incompatible client, do I misunderstand the feature? I want to disable the warning for every version:
image

I also don't see how this line would differentiate between undefined and false?

const optVersion = version === undefined || version === false ? require('./version').defaultVersion : version

If I find out what's wrong here I can create a PR, sure. Also the types would need to be adjusted. I'm only allowed to use strings.

@rom1504
Copy link
Member Author

rom1504 commented Mar 29, 2022 via email

@jojomatik
Copy link
Contributor

jojomatik commented Mar 29, 2022

I've created a PR #976 that should tackle my problems. Feel free to take a look and review :) I hope the versions are assigned correctly

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.

Cross version
2 participants