# Uses of Class
net.md_5.bungee.api.chat.BaseComponent

Packages that use BaseComponent
Package
Description
net.md_5.bungee.api.chat
net.md_5.bungee.api.chat.hover.content

- ## Uses of BaseComponent in net.md_5.bungee.api.chat

  Subclasses of BaseComponent in net.md_5.bungee.api.chat
  Modifier and Type
  Class
  Description
  `final class`
  `KeybindComponent`
  `final class`
  `ObjectComponent`
  An object component that can be used to display objects.
  `final class`
  `ScoreComponent`
  This component displays the score based on a player score on the scoreboard.
  `final class`
  `SelectorComponent`
  This component processes a target selector into a pre-formatted set of discovered names.
  `final class`
  `TextComponent`
  `final class`
  `TranslatableComponent`
  Methods in net.md_5.bungee.api.chat that return BaseComponent
  Modifier and Type
  Method
  Description
  `BaseComponent`
  ComponentBuilder.`build()`
  Returns the component built by this builder.
  `BaseComponent[]`
  ComponentBuilder.`create()`
  Returns the components needed to display the message created by this builder.git
  `abstract BaseComponent`
  BaseComponent.`duplicate()`
  Clones the BaseComponent and returns the clone.
  `BaseComponent`
  BaseComponent.`duplicateWithoutFormatting()`
  Deprecated.
  API use discouraged, use traditional duplicate
  `static BaseComponent`
  TextComponent.`fromArray(BaseComponent... components)`
  Internal compatibility method to transform an array of components to a single component.
  `static BaseComponent`
  TextComponent.`fromLegacy(String message)`
  Converts the old formatting system that used `ChatColor.COLOR_CHAR` into the new json based system.
  `static BaseComponent`
  TextComponent.`fromLegacy(String message, ChatColor defaultColor)`
  Converts the old formatting system that used `ChatColor.COLOR_CHAR` into the new json based system.
  `static BaseComponent[]`
  TextComponent.`fromLegacyText(String message)`
  Deprecated.
  `TextComponent.fromLegacy(String)` is preferred as it will consolidate all components into a single BaseComponent with extra contents as opposed to an array of components which is non-standard and may result in unexpected behavior.
  `static BaseComponent[]`
  TextComponent.`fromLegacyText(String message, ChatColor defaultColor)`
  Deprecated.
  `TextComponent.fromLegacy(String, ChatColor)` is preferred as it will consolidate all components into a single BaseComponent with extra contents as opposed to an array of components which is non-standard and may result in unexpected behavior.
  `BaseComponent`
  ComponentBuilder.`getComponent(int pos)`
  Gets the component part at the position of given index.
  `BaseComponent`
  ComponentBuilder.`getCurrentComponent()`
  Gets the component at the position of the cursor.
  `BaseComponent`
  SelectorComponent.`getSeparator()`
  The separator of multiple selected entities.
  Methods in net.md_5.bungee.api.chat that return types with arguments of type BaseComponent
  Modifier and Type
  Method
  Description
  `List<BaseComponent>`
  BaseComponent.`getExtra()`
  Appended components that inherit this component's formatting and events
  `List<BaseComponent>`
  ComponentBuilder.`getParts()`
  `List<BaseComponent>`
  TranslatableComponent.`getWith()`
  The components to substitute into the translation
  Methods in net.md_5.bungee.api.chat with parameters of type BaseComponent
  Modifier and Type
  Method
  Description
  `void`
  BaseComponent.`addExtra(BaseComponent component)`
  Appends a component to the component.
  `void`
  TranslatableComponent.`addWith(BaseComponent component)`
  Adds a component substitution to the component.
  `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.
  `void`
  BaseComponent.`copyFormatting(BaseComponent component)`
  Copies the events and formatting of a BaseComponent.
  `void`
  BaseComponent.`copyFormatting(BaseComponent component, boolean replace)`
  Copies the events and formatting of a BaseComponent.
  `void`
  BaseComponent.`copyFormatting(BaseComponent component, ComponentBuilder.FormatRetention retention, boolean replace)`
  Copies the specified formatting of a BaseComponent.
  `static BaseComponent`
  TextComponent.`fromArray(BaseComponent... components)`
  Internal compatibility method to transform an array of components to a single component.
  `void`
  SelectorComponent.`setSeparator(BaseComponent separator)`
  The separator of multiple selected entities.
  `static String`
  BaseComponent.`toLegacyText(BaseComponent... components)`
  Converts the components to a string that uses the old formatting codes (`ChatColor.COLOR_CHAR`
  `static String`
  BaseComponent.`toPlainText(BaseComponent... components)`
  Converts the components into a string without any formatting
  Method parameters in net.md_5.bungee.api.chat with type arguments of type BaseComponent
  Modifier and Type
  Method
  Description
  `void`
  BaseComponent.`setExtra(List<BaseComponent> components)`
  `void`
  TranslatableComponent.`setWith(List<BaseComponent> components)`
  Sets the translation substitutions to be used in this component.
  Constructors in net.md_5.bungee.api.chat with parameters of type BaseComponent
  Modifier
  Constructor
  Description
  ``
  `ComponentBuilder(BaseComponent component)`
  Creates a ComponentBuilder with the given component as the first part.
  ``
  `HoverEvent(HoverEvent.Action action, BaseComponent[] value)`
  Deprecated.
  `HoverEvent(Action, Content[])`
  ``
  `SelectorComponent(String selector, BaseComponent separator)`
  Creates a new `SelectorComponent` instance.
  ``
  `TextComponent(BaseComponent... extras)`
  Creates a TextComponent with blank text and the extras set to the passed array

- ## Uses of BaseComponent in net.md_5.bungee.api.chat.hover.content

  Methods in net.md_5.bungee.api.chat.hover.content that return BaseComponent
  Modifier and Type
  Method
  Description
  `BaseComponent`
  Entity.`getName()`
  Name to display as the entity.
  Methods in net.md_5.bungee.api.chat.hover.content with parameters of type BaseComponent
  Modifier and Type
  Method
  Description
  `void`
  Entity.`setName(BaseComponent name)`
  Name to display as the entity.
  Constructors in net.md_5.bungee.api.chat.hover.content with parameters of type BaseComponent
  Modifier
  Constructor
  Description
  ``
  `Entity(String type, @NonNull String id, BaseComponent name)`
  Creates a new `Entity` instance.
  ``
  `Text(BaseComponent value)`
  ``
  `Text(BaseComponent[] value)`