Class ComponentStyle

java.lang.Object
net.md_5.bungee.api.chat.ComponentStyle
All Implemented Interfaces:
Cloneable

public final class ComponentStyle extends Object implements Cloneable
Represents a style that may be applied to a BaseComponent.
  • Constructor Details

    • ComponentStyle

      public ComponentStyle()
  • Method Details

    • getColor

      public ChatColor getColor()
      Returns the color of this style. May return null.
      Returns:
      the color of this style, or null if default color
    • hasColor

      public boolean hasColor()
      Returns whether or not this style has a color set.
      Returns:
      whether a color is set
    • getFont

      public String getFont()
      Returns the font of this style. May return null.
      Returns:
      the font of this style, or null if default font
    • hasFont

      public boolean hasFont()
      Returns whether or not this style has a font set.
      Returns:
      whether a font is set
    • isBold

      public boolean isBold()
      Returns whether this style is bold.
      Returns:
      whether the style is bold
    • isBoldRaw

      public Boolean isBoldRaw()
      Returns whether this style is bold. May return null.
      Returns:
      whether the style is bold, or null if not set
    • isItalic

      public boolean isItalic()
      Returns whether this style is italic. May return null.
      Returns:
      whether the style is italic
    • isItalicRaw

      public Boolean isItalicRaw()
      Returns whether this style is italic. May return null.
      Returns:
      whether the style is italic, or null if not set
    • isUnderlined

      public boolean isUnderlined()
      Returns whether this style is underlined.
      Returns:
      whether the style is underlined
    • isUnderlinedRaw

      public Boolean isUnderlinedRaw()
      Returns whether this style is underlined. May return null.
      Returns:
      whether the style is underlined, or null if not set
    • isStrikethrough

      public boolean isStrikethrough()
      Returns whether this style is strikethrough
      Returns:
      whether the style is strikethrough
    • isStrikethroughRaw

      public Boolean isStrikethroughRaw()
      Returns whether this style is strikethrough. May return null.
      Returns:
      whether the style is strikethrough, or null if not set
    • isObfuscated

      public boolean isObfuscated()
      Returns whether this style is obfuscated.
      Returns:
      whether the style is obfuscated
    • isObfuscatedRaw

      public Boolean isObfuscatedRaw()
      Returns whether this style is obfuscated. May return null.
      Returns:
      whether the style is obfuscated, or null if not set
    • isEmpty

      public boolean isEmpty()
      Returns whether this style has no formatting explicitly set.
      Returns:
      true if no value is set, false if at least one is set
    • clone

      public ComponentStyle clone()
      Overrides:
      clone in class Object
    • builder

      public static ComponentStyleBuilder builder()
      Returns:
      the builder
    • builder

      public static ComponentStyleBuilder builder(ComponentStyle other)
      Get a new ComponentStyleBuilder with values initialized to the style values of the supplied ComponentStyle.
      Parameters:
      other - the component style whose values to copy into the builder
      Returns:
      the builder