PlaceholderAPI
Plan has some placeholders.
📢 Important
Plan fetches data from database for the placeholders - if server thread is used (like when using /papi parse), the values are cached on the first run and so the placeholder needs to be replaced twice before it appears.
This is to not crash the server.If placeholder doesn't appear with your plugin right away, but works a bit later, you can add it to
Plugins.PlaceholderAPI.Load_these_placeholders_on_join
setting in the Plan config and it will work better.
Page version: 5.6 build 2816
List of Placeholders
Use placeholders like this: %plan_<placeholder>%
- All placeholders with
_day
,_week
and_month
show data for last 24h, 7d and 30d respectively.
Player
These placeholders are about the player who sees the placeholder.
You can add :player
to the end of the placeholder to show data about specific player, for example %plan_player_activity_group:AuroraLS3%
or %plan_player_activity_group:ed568cd3-f5ab-4893-996b-90fa3b9a9e64%
. If the player is not found the placeholder is not replaced.
player_activity_group
player_activity_index
player_banned
player_current_session_length
player_current_session_length_raw
player_death_count
player_deaths
player_favorite_server
player_geolocation
player_is_afk
player_is_afk_badge
player_join_address
player_kdr
player_kick_count
player_kill_death_ratio
player_lastseen
player_latest_session_length
player_latest_session_length_raw
player_mob_caused_deaths
player_mob_kdr
player_mob_kill_count
player_operator
player_ping_average_day
player_ping_average_month
player_ping_average_week
player_player_caused_deaths
player_player_kill_count
player_previous_session_length
player_previous_session_length_raw
player_recent_death_{n}
player_recent_kill_{n}
player_registered
player_server_time_active
player_server_time_active_raw
player_server_time_afk
player_server_time_afk_raw
player_server_time_day
player_server_time_day_raw
player_server_time_month
player_server_time_month_raw
player_server_time_total
player_server_time_total_raw
player_server_time_week
player_server_time_week_raw
player_sessions_count
player_time_active
player_time_active_day
player_time_active_day_raw
player_time_active_month
player_time_active_month_raw
player_time_active_raw
player_time_active_week
player_time_active_week_raw
player_time_afk
player_time_afk_raw
player_time_day
player_time_day_raw
player_time_month
player_time_month_raw
player_time_total
player_time_total_raw
player_time_week
player_time_week_raw
{n}
: replace this with 1-10
World
These placeholders are about a specific world
worlds_playtime_total_%worldname%
Change %worldname%
with the name of the world like world_nether
Server
These placeholders are about the server the placeholder is used on.
You can add :server
to the end of the placeholder to show data about specific server, for example %plan_server_tps_day:Lobby%
or %plan_tps_day:ed568cd3-f5ab-4893-996b-90fa3b9a9e64%
(Use plan servers
command for list of servers)
network_ping_day
network_ping_month
network_ping_total
network_ping_week
network_players_registered_day
network_players_registered_month
network_players_registered_total
network_players_registered_week
network_players_unique_day
network_players_unique_month
network_players_unique_total
network_players_unique_week
network_regular_players
network_sessions_active_time_day
network_sessions_active_time_day_raw
network_sessions_active_time_month
network_sessions_active_time_month_raw
network_sessions_active_time_total
network_sessions_active_time_total_raw
network_sessions_active_time_week
network_sessions_active_time_week_raw
network_sessions_afk_time_day
network_sessions_afk_time_day_raw
network_sessions_afk_time_month
network_sessions_afk_time_month_raw
network_sessions_afk_time_total
network_sessions_afk_time_total_raw
network_sessions_afk_time_week
network_sessions_afk_time_week_raw
network_sessions_average_session_length_day
network_sessions_average_session_length_month
network_sessions_average_session_length_total
network_sessions_average_session_length_week
network_sessions_average_unique_players_day
network_sessions_average_unique_players_month
network_sessions_average_unique_players_total
network_sessions_average_unique_players_week
network_sessions_new_players_day
network_sessions_new_players_month
network_sessions_new_players_total
network_sessions_new_players_week
network_sessions_play_time_day
network_sessions_play_time_day_raw
network_sessions_play_time_month
network_sessions_play_time_month_raw
network_sessions_play_time_total
network_sessions_play_time_total_raw
network_sessions_play_time_week
network_sessions_play_time_week_raw
network_sessions_unique_players_day
network_sessions_unique_players_month
network_sessions_unique_players_today
network_sessions_unique_players_total
network_sessions_unique_players_week
operators_total
ping_day
ping_month
ping_total
ping_week
regular_players
server_average_free_disk_day
server_average_free_disk_month
server_average_free_disk_week
server_chunks_day
server_chunks_month
server_chunks_week
server_cpu_day
server_cpu_month
server_cpu_week
server_entities_day
server_entities_month
server_entities_week
server_max_free_disk_day
server_max_free_disk_month
server_max_free_disk_week
server_min_free_disk_day
server_min_free_disk_month
server_min_free_disk_week
server_name
server_players_registered_day
server_players_registered_month
server_players_registered_total
server_players_registered_week
server_players_unique_day
server_players_unique_month
server_players_unique_total
server_players_unique_week
server_ram_day
server_ram_month
server_ram_week
server_tps_day
server_tps_month
server_tps_week
server_uuid
sessions_active_time_day
sessions_active_time_day_raw
sessions_active_time_month
sessions_active_time_month_raw
sessions_active_time_total
sessions_active_time_total_raw
sessions_active_time_week
sessions_active_time_week_raw
sessions_afk_time_day
sessions_afk_time_day_raw
sessions_afk_time_month
sessions_afk_time_month_raw
sessions_afk_time_total
sessions_afk_time_total_raw
sessions_afk_time_week
sessions_afk_time_week_raw
sessions_average_session_length_day
sessions_average_session_length_month
sessions_average_session_length_total
sessions_average_session_length_week
sessions_average_unique_players_day
sessions_average_unique_players_month
sessions_average_unique_players_total
sessions_average_unique_players_week
sessions_mob_kill_day
sessions_mob_kill_month
sessions_mob_kill_total
sessions_mob_kill_week
sessions_new_players_day
sessions_new_players_month
sessions_new_players_total
sessions_new_players_week
sessions_peak_count
sessions_peak_date
sessions_play_time_day
sessions_play_time_day_raw
sessions_play_time_month
sessions_play_time_month_raw
sessions_play_time_total
sessions_play_time_total_raw
sessions_play_time_week
sessions_play_time_week_raw
sessions_players_death_day
sessions_players_death_month
sessions_players_death_total
sessions_players_death_week
sessions_players_kill_day
sessions_players_kill_month
sessions_players_kill_total
sessions_players_kill_week
sessions_recent_peak_count
sessions_recent_peak_date
sessions_unique_players_day
sessions_unique_players_month
sessions_unique_players_today
sessions_unique_players_total
sessions_unique_players_week
top_active_playtime_day_{n}
top_active_playtime_day_{n}_value
top_active_playtime_month_{n}
top_active_playtime_month_{n}_value
top_active_playtime_total_{n}
top_active_playtime_total_{n}_value
top_active_playtime_week_{n}
top_active_playtime_week_{n}_value
top_network_active_playtime_day_{n}
top_network_active_playtime_day_{n}_value
top_network_active_playtime_month_{n}
top_network_active_playtime_month_{n}_value
top_network_active_playtime_total_{n}
top_network_active_playtime_total_{n}_value
top_network_active_playtime_week_{n}
top_network_active_playtime_week_{n}_value
top_network_playtime_day_{n}
top_network_playtime_day_{n}_value
top_network_playtime_month_{n}
top_network_playtime_month_{n}_value
top_network_playtime_total_{n}
top_network_playtime_total_{n}_value
top_network_playtime_week_{n}
top_network_playtime_week_{n}_value
top_player_kills_day_{n}
top_player_kills_day_{n}_value
top_player_kills_month_{n}
top_player_kills_month_{n}_value
top_player_kills_total_{n}
top_player_kills_total_{n}_value
top_player_kills_week_{n}
top_player_kills_week_{n}_value
top_playtime_day_{n}
top_playtime_day_{n}_value
top_playtime_month_{n}
top_playtime_month_{n}_value
top_playtime_total_{n}
top_playtime_total_{n}_value
top_playtime_week_{n}
top_playtime_week_{n}_value
{n}
: replace this with 1-10
How to apply different formatting to playtime values
Credit to Benji on Discord
you can use the JavaScript expansion for papi and do something like this for only full hours:
Download the expansion:
Placeholder expansion has to be downloaded from https://api.extendedclip.com/expansions/javascript/ and put in the PlaceholderAPI/expansions/
folder
/papi reload
PlaceholderAPI/javascripts/milli_to_hours.js:
function milli_to_hours(duration) {
if (isNaN(duration)) return "Loading..."
return "" + Math.floor((duration / (1000 * 60 * 60)));
}
milli_to_hours(Number(args[0]));
PlaceholderAPI/javascript_placeholders.yml:
milli_to_hours:
file: milli_to_hours.js
then reload papi with /papi reload
and then use the placeholders like this: %javascript_milli_to_hours_{plan_player_time_total_raw}%
If you want different formatting change the javascript to give something else - duration
is in milliseconds.
Documentation
Tutorials
Configuration
- Game server Set-up
- Network Set-up
- Game server Configuration
- Network Configuration
- Login / HTTPS Set-Up
- Commands & Permissions
- Database management
- PlaceholderAPI