# 枚举的使用
net.md_5.bungee.api.chat.ComponentBuilder.FormatRetention

使用ComponentBuilder.FormatRetention的程序包
程序包
说明
net.md_5.bungee.api.chat

- ## net.md_5.bungee.api.chat中ComponentBuilder.FormatRetention的使用

  返回ComponentBuilder.FormatRetention的net.md_5.bungee.api.chat中的方法
  修饰符和类型
  方法
  说明
  `static ComponentBuilder.FormatRetention`
  ComponentBuilder.FormatRetention.`valueOf(String name)`
  返回带有指定名称的该类型的枚举常量。
  `static ComponentBuilder.FormatRetention[]`
  ComponentBuilder.FormatRetention.`values()`
  按照声明该枚举类型的常量的顺序, 返回一个包含这些常量的数组。
  参数类型为ComponentBuilder.FormatRetention的net.md_5.bungee.api.chat中的方法
  修饰符和类型
  方法
  说明
  `ComponentBuilder`
  ComponentBuilder.`append(String text, ComponentBuilder.FormatRetention retention)`
  Appends the text to the builder and makes it the current target for formatting.
  `ComponentBuilder`
  ComponentBuilder.`append(BaseComponent[] components, ComponentBuilder.FormatRetention retention)`
  Appends the components to the builder and makes the last element the current target for formatting.
  `ComponentBuilder`
  ComponentBuilder.`append(BaseComponent component, ComponentBuilder.FormatRetention retention)`
  Appends a component to the builder and makes it the current target for formatting.
  `ComponentBuilder`
  ComponentBuilder.`append(ComponentBuilder.Joiner joiner, ComponentBuilder.FormatRetention retention)`
  Allows joining additional components to this builder using the given `ComponentBuilder.Joiner`.
  `void`
  BaseComponent.`copyFormatting(BaseComponent component, ComponentBuilder.FormatRetention retention, boolean replace)`
  复制某个 BaseComponent 中的指定格式.
  `ComponentBuilder`
  ComponentBuilder.Joiner.`join(ComponentBuilder componentBuilder, ComponentBuilder.FormatRetention retention)`
  Joins additional components to the provided `ComponentBuilder` and then returns it to fulfill a chain pattern.
  `void`
  BaseComponent.`retain(ComponentBuilder.FormatRetention retention)`
  仅保留指定的格式.
  `ComponentBuilder`
  ComponentBuilder.`retain(ComponentBuilder.FormatRetention retention)`
  Retains only the specified formatting.