TextComponent.storageNbt constructor

TextComponent.storageNbt(
  1. String name, {
  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.storageNbt
String The name of your Storage(including namespace)
path the path as a String
interpret bool if nbt should be interpreted as TextComponent(optional)
...same properties... from TextComponent
TextComponent.storageNbt(
	'mypack:storage1',
	path: 'Custom.Stored.Text'
	interpret: true
)

Implementation

TextComponent.storageNbt(
  String name, {
  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, 'storage': name};
  if (interpret != null) value['interpret'] = interpret;
}