src/main/java/me/hyfe/simplespigot/text/Text.java
/**
     * Sends a message to a player, inserts placeholders and replaces colours.
     *
     * @param recipient The CommandSender to send the message to.
     * @param message   The message to send to the CommandSender.
     */
Sends a message to a player, inserts placeholders and replaces colours.
@param recipient The CommandSender to send the message to.
@param message   The message to send to the CommandSender.
Sends a message to a player inserts placeholders and replaces colours . @param recipient The CommandSender to send the message to . @param message The message to send to the CommandSender .
public static void sendMessage(CommandSender recipient, String message) {
        Supplier<String> processor = () -> {
            if (recipient instanceof OfflinePlayer && Bukkit.getPluginManager().isPluginEnabled("PlaceholderAPI")) {
                return PlaceholderAPI.setPlaceholders((OfflinePlayer) recipient, message);
            }
            return message;
        };
        recipient.sendMessage(modify(processor.get()));
    }
public static void sendMessage ( CommandSender recipient , String message ) { Supplier < String > processor = ( ) -> { if ( recipient instanceof OfflinePlayer && Bukkit . getPluginManager ( ) . isPluginEnabled ( "PlaceholderAPI" ) ) { return PlaceholderAPI . setPlaceholders ( ( OfflinePlayer ) recipient , message ) ; } return message ; } ; recipient . sendMessage ( modify ( processor . get ( ) ) ) ; }
Sends a message to a player, inserts placeholders and replaces colours.
Sends a message to a player inserts placeholders and replaces colours .