diff --git a/build.gradle b/build.gradle index d0c4cda3a..608ab545f 100644 --- a/build.gradle +++ b/build.gradle @@ -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" diff --git a/src/main/java/net/minestom/server/chat/JsonMessage.java b/src/main/java/net/minestom/server/chat/JsonMessage.java index 0ccfabb66..af8f79262 100644 --- a/src/main/java/net/minestom/server/chat/JsonMessage.java +++ b/src/main/java/net/minestom/server/chat/JsonMessage.java @@ -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) {