I was using an old version of minecraft-server-util. It was version 3.7.2.
Getting motd was easy. I found on internet some javascript code to decode Minecraft colors characters (& or §).
Decoding code looks like this:
Result looked like this (3.7.2):
btw this is the right response as Minecraft server list shows.
But the problem is, that I updated to the newest version (5.1.2 for me)
And the motd is not right. Even the new "raw" and "clean" version.
This is the new (wrong) result (5.1.2):
Let me show you what's missing.
As marked, there is missing letter O in the word SuroCraft,
letter T in word SuroCraft,
the arrow that points to left on end of the motd(◄),
these characters (⋘⋇⋙) at the end and start of the motd line 2.
Help:
If you would need, I am pasting here the real motd line 1 code with color codes;
&l&6&m► &r&b&l Suro&c&lCraft&a.eu &6&l&m ◄&r
(There are some useless color code symbols lol.)
I am pasting here raw and clean results from status function (just first line):
' ► SurCraf.eu (clean)
§f' §6§m►§b§l Sur§c§lCraf§a.eu§6§l§m §f (raw)
By the way, if you wonder, there's an apostrophe at the start of motd lines. Why? Because we tried to center our motds by this way.
Note: I tried to use mentioned decoding code for minecraft color codes for the new one version.
Because (I think so) the raw of motd is broken too, decoding code is giving me the same answer as clean version.
Maybe you use the same decoding code?
Expected behavior:
Motd should be right as older version 3.7.2. What changed?
@PetyXbron This was actually fixed in minecraft-motd-util version 1.1.6. You can update that library (which is a dependency of this one) by doing npm update minecraft-motd-util.
Getting wrong motd from new package version
I was using an old version of minecraft-server-util. It was version 3.7.2. Getting motd was easy. I found on internet some javascript code to decode Minecraft colors characters (& or §). Decoding code looks like this:
Result looked like this (3.7.2): btw this is the right response as Minecraft server list shows.
But the problem is, that I updated to the newest version (5.1.2 for me) And the motd is not right. Even the new "raw" and "clean" version.
This is the new (wrong) result (5.1.2): Let me show you what's missing.
As marked, there is missing letter O in the word SuroCraft, letter T in word SuroCraft, the arrow that points to left on end of the motd(◄), these characters (⋘⋇⋙) at the end and start of the motd line 2.
Help: If you would need, I am pasting here the real motd line 1 code with color codes;
&l&6&m► &r&b&l Suro&c&lCraft&a.eu &6&l&m ◄&r
(There are some useless color code symbols lol.)I am pasting here raw and clean results from status function (just first line):
' ► SurCraf.eu
(clean)§f' §6§m►§b§l Sur§c§lCraf§a.eu§6§l§m §f
(raw)By the way, if you wonder, there's an apostrophe at the start of motd lines. Why? Because we tried to center our motds by this way.
Note: I tried to use mentioned decoding code for minecraft color codes for the new one version. Because (I think so) the raw of motd is broken too, decoding code is giving me the same answer as clean version. Maybe you use the same decoding code?
Expected behavior: Motd should be right as older version 3.7.2. What changed?