Interface PlayerFormatter

All Superinterfaces:
BiFunction<org.bukkit.entity.Player,String,String>

public interface PlayerFormatter extends BiFunction<org.bukkit.entity.Player,String,String>
Represents a functional interface for formatting messages based on a Player.

This interface extends BiFunction, allowing it to take a Player and a String as input and return a formatted string. It can be used to personalize messages with player-specific details, such as names, ranks, or statistics.

Example usage:


 PlayerFormatter formatter = (player, message) ->
     message.replace("{player}", player.getName());

 formatter.apply(somePlayer, "Hello, {player}!");
 // Output: "Hello, Steve!"

See Also: