Velocitab/docs/Server-Links.md
William 84ae7a9437
feat: Add configuration for server links (#201)
* feat: add server URLs

* refactor: cleanup imports

* fix: only send server links to 1.21 clients

* feat: update server links on reload

* refactor: minor cleanup

* docs: add docs for server links

* fix: protocol version check issue

* Improved ServerUrl#resolve

---------

Co-authored-by: AlexDev_ <56083016+alexdev03@users.noreply.github.com>
2024-06-18 22:42:50 +01:00

1.5 KiB

Note: This feature will only apply for users connecting with Minecraft 1.21+ clients

Velocitab supports sending Server Links to players, which will be displayed in the player pause menu by 1.21+ game clients. This can be useful for linking to your server's website, Discord, or other resources.

Configuring

Server links are configured with the server_links section in your config.yml file. A link must have:

  • A url field; a valid web URL to link to
  • A label field, which is the text to display for the link. Labels can be::
    • Fully formatted custom text. You may include placeholders and formatting valid for your chosen formatter.
    • One of the following built-in label strings, which will be localized into the user's client language:
      • bug_report - Will also be shown on the disconnection error screen.
      • community_guidelines
      • support
      • status
      • feedback
      • community
      • website
      • forums
      • news
      • announcements
  • A groups field, which is a list of server groups the link should be sent to connecting players on.
    • Use '*' to show the link to all groups.

Example section

server_links:
  - url: 'https://william278.net/project/velocitab'
    label: 'website'
    groups: ['*']
  - url: 'https://william278.net/docs/velocitab'
    label: 'Documentation'
    groups: ['*']
  - url: 'https://github.com/William278/Velocitab/issues'
    label: 'bug_report' # This will use the bug report built-in label and also be shown on the player disconnect screen
    groups: ['*']