Interface GlobalPlaceholder

All Superinterfaces:
Placeholder

public interface GlobalPlaceholder extends Placeholder
A global placeholder that displays the same text to all players. See Placeholder for general information about placeholders.
Since:
1
  • Method Summary

    Modifier and Type
    Method
    Description
    @Nullable String
    getReplacement(@Nullable String argument)
    Callback for providing a placeholder replacement for a given optional argument.

    Methods inherited from interface Placeholder

    getRefreshIntervalTicks
  • Method Details

    • getReplacement

      @Nullable @Nullable String getReplacement(@Nullable @Nullable String argument)
      Callback for providing a placeholder replacement for a given optional argument. The same replacement is shown to all players.

      The argument is provided through the placeholder text: for example, the argument of {test} is null, the argument of {test: hello world} is the string "hello world".

      Warning: the implementation should be performance efficient, as it may be invoked often depending on the refresh interval of the placeholder.

      Parameters:
      argument - the optional placeholder argument, null if not specified
      Returns:
      the optional placeholder replacement, null to leave the placeholder unreplaced
      Since:
      1