Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixed parsing of the MOTD as Component #625

Merged
1 commit merged into from Apr 6, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion pom.xml
Expand Up @@ -74,7 +74,7 @@
<dependency>
<groupId>net.kyori</groupId>
<artifactId>adventure-text-serializer-gson</artifactId>
<version>4.2.0</version>
<version>4.7.0</version>
</dependency>
<dependency>
<groupId>org.projectlombok</groupId>
Expand Down
Expand Up @@ -53,7 +53,7 @@ public void read(NetInput in) throws IOException {

PlayerInfo players = new PlayerInfo(plrs.get("max").getAsInt(), plrs.get("online").getAsInt(), profiles);
JsonElement desc = obj.get("description");
Component description = DefaultComponentSerializer.get().deserialize(desc.toString());
Component description = DefaultComponentSerializer.get().serializer().fromJson(desc, Component.class);
byte[] icon = null;
if(obj.has("favicon")) {
icon = this.stringToIcon(obj.get("favicon").getAsString());
Expand Down