类 TranslatableComponent

    • 构造器详细资料

      • TranslatableComponent

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

        public TranslatableComponent​(java.lang.String translate,
                                     java.lang.Object... with)
        Creates a translatable component with the passed substitutions
        参数:
        translate - the translation key
        with - the Strings and BaseComponents to use into the translation
        另请参阅:
        translate, setWith(List)
      • TranslatableComponent

        public TranslatableComponent()
    • 方法详细资料

      • setWith

        public void setWith​(java.util.List<BaseComponent> components)
        Sets the translation substitutions to be used in this component. Removes any previously set substitutions
        参数:
        components - the components to substitute
      • addWith

        public void addWith​(java.lang.String text)
        Adds a text substitution to the component. The text will inherit this component's formatting
        参数:
        text - the text to substitute
      • addWith

        public void addWith​(BaseComponent component)
        Adds a component substitution to the component. The text will inherit this component's formatting
        参数:
        component - the component to substitute
      • toPlainText

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

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

        public java.util.regex.Pattern getFormat()
      • getTranslate

        public java.lang.String getTranslate()
      • setTranslate

        public void setTranslate​(java.lang.String translate)
      • equals

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

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