Skip to content

Commit

Permalink
Fixup chat messages on 1.21 as well
Browse files Browse the repository at this point in the history
  • Loading branch information
FlorianMichael committed Jun 17, 2024
1 parent b0a68be commit 9871d1f
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
package com.viaversion.fabric.mc121.commands;

import com.viaversion.viaversion.api.command.ViaCommandSender;
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;
Expand All @@ -43,7 +44,7 @@ public boolean hasPermission(String s) {
}

public static MutableText fromLegacy(String legacy) {
return Text.Serialization.fromJson(legacy, DynamicRegistryManager.EMPTY);
return Text.Serialization.fromJson(ComponentUtil.legacyToJsonString(legacy), DynamicRegistryManager.EMPTY);
}

@Override
Expand Down

0 comments on commit 9871d1f

Please sign in to comment.