mirror of
https://github.com/ViaVersion/ViaFabric.git
synced 2024-12-23 16:37:44 +01:00
Fixup command execution on 1.20.6+
Closes https://github.com/ViaVersion/ViaFabric/issues/340
This commit is contained in:
parent
880a64c6c1
commit
113a6e354a
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user