类 SelectorComponent

java.lang.Object
net.md_5.bungee.api.chat.BaseComponent
net.md_5.bungee.api.chat.SelectorComponent

public final class SelectorComponent extends BaseComponent
This component processes a target selector into a pre-formatted set of discovered names.
Multiple targets may be obtained, and with commas separating each one and a final "and" for the last target. The resulting format cannot be overwritten. This includes all styling from team prefixes, insertions, click events, and hover events.
These values are filled in by the server-side implementation.
As of 1.12.2, a bug ( MC-56373 ) prevents full usage within hover events.
  • 构造器详细资料

    • SelectorComponent

      public SelectorComponent(SelectorComponent original)
      Creates a selector component from the original to clone it.
      参数:
      original - the original for the new selector component
    • SelectorComponent

      public SelectorComponent(String selector)
  • 方法详细资料

    • duplicate

      public SelectorComponent duplicate()
      从类复制的说明: BaseComponent
      克隆本组件并返回克隆副本.

      原文:Clones the BaseComponent and returns the clone.

      指定者:
      duplicate 在类中 BaseComponent
      返回:
      该组件的副本
    • toPlainText

      protected void toPlainText(StringBuilder builder)
    • toLegacyText

      protected void toLegacyText(StringBuilder builder)
    • getSelector

      public String getSelector()
      An entity target selector (@p, @a, @r, @e, or @s) and, optionally, selector arguments (e.g. @e[r=10,type=Creeper]).
    • setSelector

      public void setSelector(String selector)
      An entity target selector (@p, @a, @r, @e, or @s) and, optionally, selector arguments (e.g. @e[r=10,type=Creeper]).
    • toString

      public String toString()
      覆盖:
      toString 在类中 BaseComponent
    • equals

      public boolean equals(Object o)
      覆盖:
      equals 在类中 BaseComponent
    • canEqual

      protected boolean canEqual(Object other)
      覆盖:
      canEqual 在类中 BaseComponent
    • hashCode

      public int hashCode()
      覆盖:
      hashCode 在类中 BaseComponent