Interface TranslatableComponent

    • Method Detail

      • key

        @NotNull
        @NotNull java.lang.String key()
        Gets the translation key.
        Returns:
        the translation key
        Since:
        4.0.0
      • key

        @Contract(pure=true)
        @NotNull
        default @NotNull TranslatableComponent key​(@NotNull
                                                   @NotNull Translatable translatable)
        Sets the translation key.
        Parameters:
        translatable - the translatable object to get the key from
        Returns:
        a translatable component
        Since:
        4.8.0
      • key

        @Contract(pure=true)
        @NotNull
        @NotNull TranslatableComponent key​(@NotNull
                                           @NotNull java.lang.String key)
        Sets the translation key.
        Parameters:
        key - the translation key
        Returns:
        a translatable component
        Since:
        4.0.0
      • args

        @NotNull
        @NotNull java.util.List<Component> args()
        Gets the unmodifiable list of translation arguments.
        Returns:
        the unmodifiable list of translation arguments
        Since:
        4.0.0
      • args

        @Contract(pure=true)
        @NotNull
        @NotNull TranslatableComponent args​(@NotNull
                                            @NotNull ComponentLike @NotNull ... args)
        Sets the translation arguments for this component.
        Parameters:
        args - the translation arguments
        Returns:
        a translatable component
        Since:
        4.0.0
      • args

        @Contract(pure=true)
        @NotNull
        @NotNull TranslatableComponent args​(@NotNull
                                            @NotNull java.util.List<? extends ComponentLike> args)
        Sets the translation arguments for this component.
        Parameters:
        args - the translation arguments
        Returns:
        a translatable component
        Since:
        4.0.0
      • fallback

        @Nullable
        @Nullable java.lang.String fallback()
        Gets the translation fallback text for this component. The fallback text will be shown when the client doesn't know the translation key used in the translatable component.
        Returns:
        the fallback string
        Since:
        4.13.0
        Since Minecraft:
        1.19.4
      • fallback

        @Contract(pure=true)
        @NotNull
        @NotNull TranslatableComponent fallback​(@Nullable
                                                @Nullable java.lang.String fallback)
        Sets the translation fallback text for this component. The fallback text will be shown when the client doesn't know the translation key used in the translatable component.
        Parameters:
        fallback - the fallback string
        Returns:
        a translatable component
        Since:
        4.13.0
        Since Minecraft:
        1.19.4
      • examinableProperties

        @NotNull
        default @NotNull java.util.stream.Stream<? extends net.kyori.examination.ExaminableProperty> examinableProperties()
        Specified by:
        examinableProperties in interface Component
        Specified by:
        examinableProperties in interface net.kyori.examination.Examinable