Interface GlobalTranslationProvider

Functional Interface:
This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.

@FunctionalInterface public interface GlobalTranslationProvider
A provider that supplies custom MiniMessage strings dynamically for translatable keys globally.

This interface is used to inject custom text representations for any translated component system-wide, taking priority over the standard language file dictionaries.

  • Method Summary

    Modifier and Type
    Method
    Description
    @Nullable String
    resolve(@NotNull String key, @Nullable org.bukkit.entity.Player player)
    Resolves a custom MiniMessage string for the given translation key and viewing player.
  • Method Details

    • resolve

      @Nullable @Nullable String resolve(@NotNull @NotNull String key, @Nullable @Nullable org.bukkit.entity.Player player)
      Resolves a custom MiniMessage string for the given translation key and viewing player.
      Parameters:
      key - The translation key being resolved (e.g., "message.welcome.format").
      player - The player viewing the translated component, or null if unavailable.
      Returns:
      A MiniMessage string representing the resolved text, or null if this provider doesn't handle the given key.