DecentSoftware-eu / DecentHolograms

A lightweight but powerful hologram plugin with many features and configuration options.
https://www.spigotmc.org/resources/96927/
GNU General Public License v3.0
203 stars 96 forks source link

Custom replacemente on API #200

Closed guikaua12 closed 6 months ago

guikaua12 commented 6 months ago

Just making sure

Problem

Is it possible to do something like this?

api.registerIndividualPlaceholder("joust_rank", 20, (player, placeholder) -> {
    final JoustUser user = userCache.get(player.getName());

    if (user == null) return "";

    return NumberUtils.format(user.getLeaderboardPosition().getPosition());
});

Feature

Way to register custom placeholders

Alternatives

It would also be possible by doing '...'

Andre601 commented 6 months ago

Make a placeholder for PlaceholderAPI. The benefit of that method is that other plugins supporting PlaceholderAPI can use it too.

Dominilk01 commented 6 months ago

PlaceholderAPI alredy has a way to create custom place holder ¯_(ツ)_/¯