aboutsummaryrefslogtreecommitdiff
path: root/common/src/main/java/dev/isxander/yacl/gui/DescriptionWithName.java
blob: c29e0caa7a2df4737945905676d3b83f62fd3154 (plain)
1
2
3
4
5
6
7
8
9
10
11
package dev.isxander.yacl.gui;

import dev.isxander.yacl.api.OptionDescription;
import net.minecraft.ChatFormatting;
import net.minecraft.network.chat.Component;

public record DescriptionWithName(Component name, OptionDescription description) {
    public static DescriptionWithName of(Component name, OptionDescription description) {
        return new DescriptionWithName(name.copy().withStyle(ChatFormatting.BOLD), description);
    }
}