TextComponent.blockNbt constructor

TextComponent.blockNbt(
  1. Location location, {
  2. required String path,
  3. bool? interpret,
  4. Color? color,
  5. bool? bold,
  6. bool? underlined,
  7. bool? italic,
  8. bool? strikethrough,
  9. bool? obfuscated,
  10. TextClickEvent? clickEvent,
  11. TextHoverEvent? hoverEvent,
  12. String? insertion,
})
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;
}