bump adventure to 4.7.0

This commit is contained in:
Kieran Wallbanks 2021-03-11 16:00:53 +00:00
parent aea8a5f794
commit 4ef62a1017
2 changed files with 2 additions and 2 deletions

View File

@ -184,7 +184,7 @@ dependencies {
generatorsImplementation("com.squareup:javapoet:1.13.0")
// Adventure, for text messages
api platform("net.kyori:adventure-bom:4.6.0")
api platform("net.kyori:adventure-bom:4.7.0")
api "net.kyori:adventure-api"
api "net.kyori:adventure-text-serializer-gson"
api "net.kyori:adventure-text-serializer-plain"

View File

@ -55,7 +55,7 @@ public abstract class JsonMessage implements ComponentLike {
@Override
public @NotNull Component asComponent() {
return GsonComponentSerializer.gson().serializer().fromJson(this.getJsonObject(), Component.class);
return GsonComponentSerializer.gson().deserializeFromTree(this.getJsonObject());
}
public static @NotNull JsonMessage fromComponent(@NotNull Component component) {