IP as Server Name
This useful mod automatically uses the server's IP address as its name if you didn't specify a custom name when adding a new server to the list.
How it works
The mod injects code into the addAndClose() method of the AddServerScreen class, checking if the default name "Minecraft Server" is set. If yes, it automatically replaces it with the server's IP address.
private void addAndClose(CallbackInfo ci) {
if (server.name.equals("Minecraft Server")) {
server.name = server.address;
}
}
The server variable comes from the @Shadow annotation.
Compatibility
The mod should work on all Minecraft versions. If you encounter any issues, please report them on the GitHub repository page.