# 类的使用
net.md_5.bungee.api.chat.ComponentBuilder

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

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

  返回ComponentBuilder的net.md_5.bungee.api.chat中的方法
  修饰符和类型
  方法
  说明
  `ComponentBuilder`
  ComponentBuilder.`append(String text)`
  Appends the text to the builder and makes it the current target for formatting.
  `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 component)`
  Appends a component to the builder and makes it the current target for formatting.
  `ComponentBuilder`
  ComponentBuilder.`append(BaseComponent[] components)`
  Appends the components to the builder and makes the last element 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)`
  Allows joining additional components to this builder using the given `ComponentBuilder.Joiner` and `ComponentBuilder.FormatRetention.ALL`.
  `ComponentBuilder`
  ComponentBuilder.`append(ComponentBuilder.Joiner joiner, ComponentBuilder.FormatRetention retention)`
  Allows joining additional components to this builder using the given `ComponentBuilder.Joiner`.
  `ComponentBuilder`
  ComponentBuilder.`appendLegacy(String text)`
  Parse text to BaseComponent[] with colors and format, appends the text to the builder and makes it the current target for formatting.
  `ComponentBuilder`
  ComponentBuilder.`bold(boolean bold)`
  Sets whether the current part is bold.
  `ComponentBuilder`
  ComponentBuilder.`color(ChatColor color)`
  Sets the color of the current part.
  `ComponentBuilder`
  ComponentBuilder.`event(ClickEvent clickEvent)`
  Sets the click event for the current part.
  `ComponentBuilder`
  ComponentBuilder.`event(HoverEvent hoverEvent)`
  Sets the hover event for the current part.
  `ComponentBuilder`
  ComponentBuilder.`font(String font)`
  Sets the font of the current part.
  `ComponentBuilder`
  ComponentBuilder.`insertion(String insertion)`
  Sets the insertion text for the current part.
  `ComponentBuilder`
  ComponentBuilder.`italic(boolean italic)`
  Sets whether the current part is italic.
  `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.
  `ComponentBuilder`
  ComponentBuilder.`obfuscated(boolean obfuscated)`
  Sets whether the current part is obfuscated.
  `ComponentBuilder`
  ComponentBuilder.`reset()`
  Sets the current part back to normal settings.
  `ComponentBuilder`
  ComponentBuilder.`resetCursor()`
  Resets the cursor to index of the last element.
  `ComponentBuilder`
  ComponentBuilder.`retain(ComponentBuilder.FormatRetention retention)`
  Retains only the specified formatting.
  `ComponentBuilder`
  ComponentBuilder.`setCursor(int pos)`
  Sets the position of the current component to be modified
  `ComponentBuilder`
  ComponentBuilder.`strikethrough(boolean strikethrough)`
  Sets whether the current part is strikethrough.
  `ComponentBuilder`
  ComponentBuilder.`underlined(boolean underlined)`
  Sets whether the current part is underlined.
  参数类型为ComponentBuilder的net.md_5.bungee.api.chat中的方法
  修饰符和类型
  方法
  说明
  `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.
  参数类型为ComponentBuilder的net.md_5.bungee.api.chat中的构造器
  限定符
  构造器
  说明
  ``
  `ComponentBuilder(ComponentBuilder original)`
  Creates a ComponentBuilder from the other given ComponentBuilder to clone it.