From 113a6e354a3729bcfc5549af4c503ff2c24850d2 Mon Sep 17 00:00:00 2001 From: FlorianMichael Date: Sat, 15 Jun 2024 14:46:34 +0200 Subject: [PATCH] Fixup command execution on 1.20.6+ Closes https://github.com/ViaVersion/ViaFabric/issues/340 --- .../viaversion/fabric/mc1206/commands/NMSCommandSender.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/viafabric-mc1206/src/main/java/com/viaversion/fabric/mc1206/commands/NMSCommandSender.java b/viafabric-mc1206/src/main/java/com/viaversion/fabric/mc1206/commands/NMSCommandSender.java index d6adb40..55a9caf 100644 --- a/viafabric-mc1206/src/main/java/com/viaversion/fabric/mc1206/commands/NMSCommandSender.java +++ b/viafabric-mc1206/src/main/java/com/viaversion/fabric/mc1206/commands/NMSCommandSender.java @@ -17,6 +17,7 @@ */ package com.viaversion.fabric.mc1206.commands; +import com.viaversion.viaversion.util.ComponentUtil; import net.fabricmc.fabric.api.client.command.v2.FabricClientCommandSource; import net.minecraft.command.CommandSource; import net.minecraft.entity.Entity; @@ -43,7 +44,7 @@ public class NMSCommandSender implements ViaCommandSender { } public static MutableText fromLegacy(String legacy) { - return Text.Serialization.fromJson(legacy, DynamicRegistryManager.EMPTY); + return Text.Serialization.fromJson(ComponentUtil.legacyToJsonString(legacy), DynamicRegistryManager.EMPTY); } @Override