mirror of
https://github.com/mcMMO-Dev/mcMMO.git
synced 2025-06-27 11:14:44 +02:00
Use legacy serializer instead
This commit is contained in:
@ -6,6 +6,7 @@ import net.kyori.adventure.text.ComponentBuilder;
|
||||
import net.kyori.adventure.text.TextComponent;
|
||||
import net.kyori.adventure.text.event.HoverEvent;
|
||||
import net.kyori.adventure.text.format.NamedTextColor;
|
||||
import net.kyori.adventure.text.serializer.legacy.LegacyComponentSerializer;
|
||||
import net.md_5.bungee.api.chat.BaseComponent;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
@ -98,4 +99,8 @@ public class TextUtils {
|
||||
public static @NotNull TextComponent ofBungeeRawStrings(@NotNull String bungeeRawString) {
|
||||
return ofBungeeComponents(convertToBungeeComponent(bungeeRawString));
|
||||
}
|
||||
|
||||
public static @NotNull TextComponent ofLegacyTextRaw(@NotNull String rawString) {
|
||||
return LegacyComponentSerializer.legacySection().deserialize(rawString);
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user