Skip to content

Update the creation of the description field + minor change to favicon field#148

Merged
kevinkjt2000 merged 2 commits intoDinnerbone:masterfrom
Iapetus-11:master
Jul 7, 2021
Merged

Update the creation of the description field + minor change to favicon field#148
kevinkjt2000 merged 2 commits intoDinnerbone:masterfrom
Iapetus-11:master

Conversation

@Iapetus-11
Copy link
Copy Markdown
Contributor

@Iapetus-11 Iapetus-11 commented Jun 22, 2021

This PR implements the following (Resolves #147):

  • Instead of ignoring formatted text in server MOTDs/descriptions, the code will now stringify the MOTD using Minecraft formatting codes into something like this: ' §6The §k§4||§l§9CubeCraft§k§4||§f §6Network §a[NA 1.12.2+]\n §l§c◆§f §l§bNEW 1.12 MAPS§f §l§7+§f §l§eEPIC PARKOUR UPDATE!§f §l§c◆§f'
  • Use raw.get("favicon") instead of checking to see if the favicon field exists in the raw data.

I tested this PR on hypixel.net, cubecraft.net, and xenon.iapetus11.me and it worked perfectly.

@Iapetus-11
Copy link
Copy Markdown
Contributor Author

Iapetus-11 commented Jun 22, 2021

If the new content of the description field seems a bit messy, perhaps we could add a plain_description field that doesn't have the formatting codes.

kevinkjt2000 added a commit that referenced this pull request Jul 7, 2021
@kevinkjt2000 kevinkjt2000 merged commit 1b20c07 into Dinnerbone:master Jul 7, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Almost no servers return MOTD on ping

2 participants