Class ComponentBuilder

java.lang.Object
com.mclds.plugins.customplugin.utils.ComponentBuilder

public class ComponentBuilder extends Object
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    static net.kyori.adventure.text.Component
    button(String text, String hoverText, net.kyori.adventure.text.format.NamedTextColor color)
     
    static net.kyori.adventure.text.Component
    link(String href)
     
    static net.kyori.adventure.text.Component
    link(String text, String href)
     
    static List<net.kyori.adventure.text.Component>
    list(Object... objects)
     
    static net.kyori.adventure.text.Component
    of(Object... objects)
     
    static net.kyori.adventure.text.Component
    ofRaw(Object... objects)
    生成统一颜色的文本,消除原有的斜体样式
    static net.kyori.adventure.text.TextComponent
    ofRaw(net.kyori.adventure.text.format.NamedTextColor color, Object... objects)
    生成统一颜色的文本,消除原有的斜体样式
    static List<net.kyori.adventure.text.TextComponent>
    ofRawList(net.kyori.adventure.text.format.NamedTextColor color, List<?> objects)
     
    static List<net.kyori.adventure.text.TextComponent>
    ofRaws(Object... objects)
     
    static List<net.kyori.adventure.text.TextComponent>
    ofRaws(net.kyori.adventure.text.format.NamedTextColor color, Object... objects)
    生成统一颜色的文本,消除原有的斜体样式
    static net.kyori.adventure.text.format.Style
     
    static net.kyori.adventure.text.format.Style
    rawStyle(net.kyori.adventure.text.format.TextColor color)
     

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • ComponentBuilder

      public ComponentBuilder()
  • Method Details

    • of

      public static net.kyori.adventure.text.Component of(Object... objects)
    • list

      public static List<net.kyori.adventure.text.Component> list(Object... objects)
    • ofRaw

      public static net.kyori.adventure.text.Component ofRaw(Object... objects)
      生成统一颜色的文本,消除原有的斜体样式
    • ofRaw

      public static net.kyori.adventure.text.TextComponent ofRaw(net.kyori.adventure.text.format.NamedTextColor color, Object... objects)
      生成统一颜色的文本,消除原有的斜体样式
    • ofRaws

      public static List<net.kyori.adventure.text.TextComponent> ofRaws(net.kyori.adventure.text.format.NamedTextColor color, Object... objects)
      生成统一颜色的文本,消除原有的斜体样式
    • ofRaws

      public static List<net.kyori.adventure.text.TextComponent> ofRaws(Object... objects)
    • ofRawList

      public static List<net.kyori.adventure.text.TextComponent> ofRawList(net.kyori.adventure.text.format.NamedTextColor color, List<?> objects)
    • link

      public static net.kyori.adventure.text.Component link(String href)
    • link

      public static net.kyori.adventure.text.Component link(String text, String href)
    • rawStyle

      public static net.kyori.adventure.text.format.Style rawStyle(net.kyori.adventure.text.format.TextColor color)
    • rawStyle

      public static net.kyori.adventure.text.format.Style rawStyle()
    • button

      public static net.kyori.adventure.text.Component button(String text, String hoverText, net.kyori.adventure.text.format.NamedTextColor color)