类 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​(java.lang.String selector)
    • 方法详细资料

      • toPlainText

        protected void toPlainText​(java.lang.StringBuilder builder)
      • toLegacyText

        protected void toLegacyText​(java.lang.StringBuilder builder)
      • getSelector

        public java.lang.String getSelector()
      • setSelector

        public void setSelector​(java.lang.String selector)
      • equals

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

        protected boolean canEqual​(java.lang.Object other)
        覆盖:
        canEqual 在类中 BaseComponent