crwdns149397:0crwdne149397:0
crwdns149399:0:javadoc:crwdne149399:0
Tip
crwdns149401:0:doc:crwdne149401:0
crwdns149403:0crwdne149403:0
{
underlined=true
color=red
text="Hello, world!"
}
crwdns149405:0crwdne149405:0
import com.google.common.reflect.TypeToken;
import ninja.leaping.configurate.ConfigurationNode;
import org.spongepowered.api.text.Text;
import org.spongepowered.api.text.format.TextColors;
import org.spongepowered.api.text.format.TextStyles;
ConfigurationNode node = loader.load();
Text text = Text.of(TextColors.RED, TextStyles.UNDERLINE, "Hello World!");
node.getNode("mytext").setValue(TypeToken.of(Text.class), text);
loader.save(node);
crwdns149407:0crwdne149407:0
Text text = node.getNode("mytext").getValue(TypeToken.of(Text.class));
Note
crwdns149409:0:javadoc:crwdnd149409:0:javadoc:crwdne149409:0