ServerAddressSpaceFix
No reviews yet
Fix the "unknown host" bug when adding a server or connecting directly to a server with a space at the end of the server address
Does not follow a specific thematic focus apart from vanilla Minecraft.
Used for mods with little to no gameplay elements.
Includes quality of life improvements and small tweaks to enhance and customize gameplay.
Addresses and fixes known bugs and issues.
Enhances game performance and optimizes resource usage.
Fabric is a mod loader for versions 1.14+ of Minecraft, particularly popular for client side and optimization mods.
Community voices
Reviews
Click once to include, again to exclude, again to clear
No reviews yet. Be the first to review this project!
Get it on
Available Platforms
Compatibility
Supported Environments
About
Project Details
For authors
Embed Badge
If you're the author of this project, you can embed a live badge anywhere that supports HTML or Markdown. It updates automatically whenever ratings change.
Use HTML for any page that supports it, or Markdown for README files and Markdown-based descriptions.
Identifiers
Platform IDs
About
Description
简体中文(GitHub) 简体中文(Gitea) English(GitHub) English(Gitea)
Introduction
This mod is intended to fix a bug that was reported on November 26, 2021 and still has not been fixed. Bug tracker link
Features
If the server address you enter on the "Add Server" or "Direct Connect" screen contains spaces at the beginning, the end, or in the middle, this mod will automatically remove them. This prevents the "Unknown Host" bug mentioned above.
Why this mod exists
A few months ago, I wanted to play on a server. I copied the address from the server's official website, pasted it into the "Server Address" field, saved it, and unexpectedly got an "Unknown Host" error.
No panic, this was obviously DNS failing to resolve the corresponding address. Let's try pinging it first.
Ping could resolve the domain name to an address, and then I suspected the Great Firewall might be doing something again, so I used a tool from ZhanZhangJia to test it. The results were exactly the same as mine.
That was rather strange.
Then, after fiddling with it for a while, I found the problem.
There was a space at the end of the server address I copied.
That was pretty hard to accept. After continuing to tinker for a while and confirming that the problem could be reproduced reliably, I submitted a bug report to the tracker.
And guess what?
My English is completely terrible, so I did not continue talking about it. The issue description was written using a translator.
But honestly, I felt this was kind of absurd.
Since your address is a String, how hard could it be to call trim on it afterwards?
Also, as a player, when you tell me, "This was your own carelessness, so it does not even count as a bug," I cannot accept that.
So, this mod was born.
Configuration file
- If you have version isolation enabled, it should be located at
.minecraft\versions\<version name>\config\ServerAddressSpaceFix.json5 - If you do not have version isolation enabled, it should be located at
.minecraft\config\ServerAddressSpaceFix.json5
This is just a regular JSON text file, except that JSON5 supports additional features such as comments. All properties include comments, covering things such as functionality, value ranges, types, default values, and more. You can edit it with a normal text editor. You can even edit the configuration file while the game is running; it will be applied automatically after saving.
Known issues
All known issues have been fixed. If you find any new ones, please let me know. If anyone is willing to help fix a bug, PRs are welcome ╰(°▽°)╯
License
I use the even more aggressive WTFPL than MIT.
Screenshots
Gallery
Versions
Files
Relations
Project Relations
More like this
Similar Mods
Suggestions use data such as tags, dependencies, dependents, descriptions, titles, and more to rank how much they overlap with this mod.
On ModDex
Community snapshot
By the numbers
Statistics
Want to reach Minecraft players?
We're looking for a server hosting partner to feature here and other parts of the site. Interested? Send us a message!
Get in touchGet it on
Available Platforms
On ModDex
Community snapshot
By the numbers