Placeholders
DonutSMPCore registers PlaceholderAPI expansion donutsmpcore.
Builtin
| Placeholder |
Description |
%player_ping% |
Online player ping (resolved in resolveInText only) |
Syntax
Both formats work everywhere DonutSMPCore resolves text (chat, GUIs, messages):
%donutsmpcore_<module>_<key>%
%donutsmpcore:<module>:<key>%
Shards
| Placeholder |
Description |
%donutsmpcore_shards_value% |
Raw balance |
%donutsmpcore_shards_value_formatted% |
Compact formatted |
%donutsmpcore_shards_currency% |
Currency name |
Stats
| Placeholder |
Description |
%donutsmpcore_stats_money% |
Raw money |
%donutsmpcore_stats_money_formatted% |
Formatted money |
%donutsmpcore_stats_kills% |
Formatted kills |
%donutsmpcore_stats_kills_raw% |
Raw kill count |
%donutsmpcore_stats_deaths% |
Formatted deaths |
%donutsmpcore_stats_deaths_raw% |
Raw deaths |
%donutsmpcore_stats_blocks_placed% |
Formatted |
%donutsmpcore_stats_blocks_placed_raw% |
Raw |
%donutsmpcore_stats_blocks_broken% |
Formatted |
%donutsmpcore_stats_blocks_broken_raw% |
Raw |
%donutsmpcore_stats_mobs_killed% |
Formatted |
%donutsmpcore_stats_mobs_killed_raw% |
Raw |
%donutsmpcore_stats_playtime% |
Formatted playtime |
%donutsmpcore_stats_playtime_seconds% |
Seconds |
%donutsmpcore_stats_topsell% |
Raw sell earnings |
%donutsmpcore_stats_topsell_formatted% |
Formatted |
Shop
| Placeholder |
Description |
%donutsmpcore_shop_topspent% |
Raw shop spend |
%donutsmpcore_shop_topspent_formatted% |
Formatted |
Leaderboards
Requires stats + leaderboard modules. Configure holograms in holograms/config.yml.
Boards: money, shards, playerkills, deaths, playtime, blocksplaced, blocksbroken, mobkills, topsell, topspent
| Pattern |
Example |
%donutsmpcore_lb_<board>_top_name_<1-50>% |
%donutsmpcore_lb_money_top_name_1% |
%donutsmpcore_lb_<board>_top_value_<1-50>% |
%donutsmpcore_lb_shards_top_value_3% |
%donutsmpcore_lb_<board>_rank% |
Viewer's rank |
%donutsmpcore_lb_<board>_value% |
Viewer's value |
Team
| Placeholder |
Description |
%donutsmpcore_team_team_name% |
Team name |
%donutsmpcore_team_inteam% |
yes / no |
%donutsmpcore_team_team_online% |
Online teammates |
%donutsmpcore_team_team_tptime% |
TP warmup seconds |
Home
| Placeholder |
Description |
%donutsmpcore_home_home_pos% |
Pending delete slot |
%donutsmpcore_home_home_tptime% |
Home TP delay |
Crates
| Placeholder |
Description |
%donutsmpcore_crates_key_amount% |
Total keys |
%donutsmpcore_crates_key_type% |
First crate type |
%donutsmpcore_crates_keyall_remaining% |
Key-all cooldown |
%donutsmpcore_crates_<crateId>% |
Keys for crate |
%donutsmpcore_crates_<crateId>_key% |
Same with _key suffix |
RTP / TPA
| Placeholder |
Description |
%donutsmpcore_rtp_tp_time% |
RTP warmup |
%donutsmpcore_rtp_cooldown_time% |
RTP cooldown |
%donutsmpcore_rtpzone_tp_time% |
Zone countdown |
%donutsmpcore_tpa_is_flying% |
Yes / No |
In messages
Use directly in any DonutSMPCore message YAML:
welcome: "&7Balance: �F986%donutsmpcore_stats_money_formatted%"
Custom modules
Plugins can register placeholders:
DonutSMPPlaceholderService.registerModule("myplugin", (player, key) -> {
if ("balance".equals(key) && player != null) {
return String.valueOf(getBalance(player.getUniqueId()));
}
return null;
});
String text = DonutSMPPlaceholderService.resolveInText(
player, "&7Balance: %donutsmpcore:myplugin:balance%");
// Unregister on plugin disable
DonutSMPPlaceholderService.unregisterModule("myplugin");
See Java API.