For the longest time, Minecraft included a handy option “server-name” in its server.properties file in your root Minecraft server folder. This option has then gone unused and it has been removed completely around Minecraft 1.13.
Many plugins relied on this option to properly identify and link your server in your BungeeCord network. As such, MineAcademy stepped in and we’ve re-added this option back to your file.
How it works?
If you use any plugin from us that uses the Foundation library such as ChatControl, Boss, CoreArena, Confiscate, Winter, you don’t have to do anything. We’ll automatically append it back to your server.properties file like it used to be.
If you’re coding plugins, we welcome you to use our Foundation library. Not only will it reduce your code bloat by up to 380% or more (some students reported even higher decrease) but it will automatically take care of this property and you can call Remain#getServerName() to return its value.
And if you’re developing plugins without Foundation, you’ll have to do extra coding and open the server.properties class in onLoad() or onEnable() method in your plugin. Luckily Java provides its Properties class for that. Here is a third party article that’ll show you how to read and save to that file. Be careful, people have sensitive information such as their server’s IP in that file.
What do you need to do to configure “server-name”?
It’s very simple, all you have to do is set the “server-name” key in server.properties to the same value that as your server name in “servers” section in your BungeeCord’s config.yml, see image below. Then restart both Minecraft server and BungeeCord and it will work correctly.