TextComponent.entityNbt constructor
TextComponent.entityNbt(})
TextComponent.entityNbt | |
---|---|
Entity | the entity which has nbt to display |
path | the path as a String |
interpret | bool if nbt should be interpreted as TextComponent(optional) |
...same properties... | from TextComponent |
TextComponent.entityNbt(
Entity.Selected(),
path: 'CustomName'
underlined: true
)
⇒ {'entity':'@s','nbt':'CustomName','underlined':true}
Implementation
TextComponent.entityNbt(
Entity entity, {
required String path,
bool? interpret,
this.color,
this.bold,
this.underlined,
this.italic,
this.strikethrough,
this.obfuscated,
this.clickEvent,
this.hoverEvent,
this.insertion,
}) {
value = {'nbt': path, 'entity': entity.toString()};
if (interpret != null) value['interpret'] = interpret;
}