started work on translatable Strings (CreateCommand)

This commit is contained in:
LunarAkai 2024-05-05 01:23:10 +02:00
commit 94d796e09b
6 changed files with 80 additions and 12 deletions

View file

@ -0,0 +1,23 @@
package de.lunarakai.minecleaner.utils;
import net.kyori.adventure.text.Component;
import net.kyori.adventure.text.TextComponent;
import net.kyori.adventure.text.format.NamedTextColor;
public class MinecleanerComponentUtils {
public static TextComponent createLangComponent(String langKey, NamedTextColor namedColor) {
return Component.text()
.color(namedColor)
.append(Component.translatable(langKey))
.build();
}
public static TextComponent createLangComponent(String langKey, String arg0, NamedTextColor namedColor) {
return Component.text()
.color(namedColor)
.append(Component.translatable(langKey, Component.text(arg0)))
.build();
}
}