TextComponent.score constructor
TextComponent.score(
- Score score, {
- Color? color,
- bool? bold,
- bool? italic,
- bool? underlined,
- bool? strikethrough,
- bool? obfuscated,
- TextClickEvent? clickEvent,
- TextHoverEvent? hoverEvent,
- String? insertion,
TextComponent.score(
Entity.Selected(),
objective: 'myscores',
color:Color.Black
)
⇒ {'score':{'name': '@s','objective':'myscores'},'color':'black'}
Implementation
TextComponent.score(
Score score, {
this.color,
this.bold,
this.italic,
this.underlined,
this.strikethrough,
this.obfuscated,
this.clickEvent,
this.hoverEvent,
this.insertion,
}) {
value = {
'score': {'name': score.entity.toString(), 'objective': score.score}
};
}