How to add server links
At first what are server links, these give you the option to add in the pause screen of the user links which he can click. For example the own marketplace, website of the server, etc.
There are two things which can be used that are build in options, what will be quick and but not much configuration options available. The other option are TextComponents there you can create and style like you want.
Enable server links
Section titled “Enable server links”At first server links needed to be activated this will be done then you add to your config/config.toml this text:
[server.server_links]# Enable server links featureenable = trueThis is added below the server configuration. Also to deactivate temporarily you can set enable to false.
Build-in server links
Section titled “Build-in server links”You have 10 build in types for server links these are:
bug_reportcommunity_guidelinessupportstatusfeedbackcommunitywebsiteforumsnewsannouncements
The only special case is bug_report this will be also displayed then the server breaks or throws an exception or send
malformed data to the client.
This can be used like this:
[[server.server_links.links]]label = "bug_report"url = "https://github.com/4lve/SteelMC/issues"and a full example:
[server.server_links]# Enable server links featureenable = true
# Built-in link type (simple string label)[[server.server_links.links]]label = "bug_report"url = "https://github.com/4lve/SteelMC/issues"Custom server links
Section titled “Custom server links”These are TextComponent So you have a lot more functionality included here for the design with custom text and color. This will look like this:
[[server.server_links.links]]label = { text = "Visit the SteelMC Discord", color = "blue", bold = true }url = "https://discord.gg/suSXXNdVSf"Additional resources
Section titled “Additional resources”In the web you can find many more tutorials about TextComponent and how to use them correctly
Full example config
[server]# Server portserver_port = 25565# Maximum number of players allowed on the servermax_players = 20# Maximum view distance in chunksview_distance = 10# Maximum simulation distance in chunkssimulation_distance = 10# Whether to use Mojang's authentication serviceonline_mode = true# Whether to enable encryption for client-server communicationencryption = true# Message of the day displayed in server listsmotd = "A Steel Server"# Whether to use a custom favicon for the serveruse_favicon = true# Path to the favicon file (PNG format, 64x64 pixels)favicon = "config/favicon.png"# Whether to enforce secure chatenforce_secure_chat = false
# Compression settings[server.compression]threshold = 256level = 4
# Server links configuration[server.server_links]# Enable server links featureenable = true
# Built-in link type (simple string label)[[server.server_links.links]]label = "bug_report"url = "https://github.com/4lve/SteelMC/issues"
# Another built-in type[[server.server_links.links]]label = "website"url = "https://github.com/4lve/SteelMC"
# The news channel on discord[[server.server_links.links]]label = "announcements"url = "https://discord.com/channels/1428487339759370322/1428487584966774795"
# Custom TextComponent (object label with formatting)[[server.server_links.links]]label = { text = "Visit the SteelMC Discord", color = "blue", bold = true }url = "https://discord.gg/suSXXNdVSf"