Skip to content

PluginTranslator compatibility issue #2

@apehum

Description

@apehum

public @NotNull Component translate(@NotNull TranslatableComponent component, @Nullable Locale locale) {

This method should return null if translation doesn't exist, otherwise next registered translator in GlobalTranslator won't work (https://github.com/KyoriPowered/adventure/blob/5256a9c3d6c1eebf91b9fc4fe098893fc24cb062/api/src/main/java/net/kyori/adventure/translation/GlobalTranslatorImpl.java#L100).
Not sure why it's annotated as @NotNull, as it should be nullable: https://github.com/KyoriPowered/adventure/blob/5256a9c3d6c1eebf91b9fc4fe098893fc24cb062/api/src/main/java/net/kyori/adventure/translation/Translator.java#L113

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions