TextComponent.blockNbt constructor
TextComponent.blockNbt(})
| TextComponent.blockNbt | |
|---|---|
| Location | a location of a block |
| path | the path as a String |
| interpret | bool if nbt should be interpreted as TextComponent(optional) |
| ...same properties... | from TextComponent |
TextComponent.blockNbt(
Location.glob(x:5,y:10,z:100),
path: 'Items[0].tag.display.Name'
interpret: true
)
Implementation
TextComponent.blockNbt(
Location location, {
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, 'block': location.toString()};
if (interpret != null) value['interpret'] = interpret;
}