started work on translatable Strings (CreateCommand)
This commit is contained in:
parent
e2c84ec436
commit
94d796e09b
6 changed files with 80 additions and 12 deletions
|
|
@ -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();
|
||||
}
|
||||
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue