Interface PlaceholderResolver
- Functional Interface:
- This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.
Supplies the values of one addon's placeholders.
Called whenever one of the addon's placeholders is rendered, on whatever thread renders it - usually the main thread, but not always - so it must be cheap and thread-safe. A resolver that throws renders nothing for that placeholder; it never breaks the text around it.
- Since:
- 1.8.0
- See Also:
-
Method Summary
-
Method Details
-
resolve
@Nullable @Nullable String resolve(@Nullable @Nullable org.bukkit.OfflinePlayer player, @NotNull @NotNull String key) - Parameters:
player- the player the text is rendered for, ornullwhen there is nonekey- the part afternamespace:, lowercase, such as"kills"for%zentrix_myaddon:kills%- Returns:
- the value, or
nullwhen the key is not one of the addon's placeholders
-