placeholders - toxicity188/BetterHud GitHub Wiki
how do use the PlaceholderAPI
there are PAPI that work sync and PAPI that work with async 1 tick locks.
this method can cause memory leaks depending on how the plugin providing the PAPI handles it.
typical example is javascript
sync PAPI
need to define a placeholder.
create a yml file in the placeholder folder and enter it as shown in the picture.
works async when async: true
test:
variable: online
placeholder: "%server_online%"
update: 20
#async: true
(update is the update interval in ticks.)
can then use it in the following format: "[string:online]"
async PAPI
don't need to configure anything, just use "[papi:name]".
ex.papi:cmi_user_name
built-in PAPI
if you can, this is the most recommended method.
Bukkit
Default Listeners
health
vehicle_health
food
armor
air
exp
absorption
Default (return String)
name
gamemode
world
Default (return Number)
hotbar_slot
health
food
armor
air
max_air
max_health
absorption
max_health_with_absorption
health_percentage
level
last_health
last_health_percentage
potion_effect_duration:name (ex. potion_effect_duration:blindness)
empty_space
total_amount:item_type (ex. total_amount:stone)
storage:item_type (ex. storage:stone)
vehicle_health
vehicle_max_health
vehicle_max_health_with_absorption
vehicle_health_percentage
vehicle_air
vehicle_max_air
popup-index
Default (return Boolean)
dead
frozen
burning
has_permission:name (ex. has_permission:hud.hud)
has_main_hand
has_off_hand
MMOCore Listeners
mmocore_mana
mmocore_stamina
mmocore_stellium
mmocore_experience
mmocore_cooldown_slot
mmocore_cooldown_skill
MMOCore (return String)
mmocore_class
mmocore_guild_id
mmocore_guild_name
mmocore_skill_name:arg
mmocore_party_member:number
mmocore_party_member_exclude_mine:number
MMOCore (return Number)
mmocore_mana
mmocore_max_mana
mmocore_mana_percentage
mmocore_stamina
mmocore_max_stamina
mmocore_stamina_percentage
mmocore_stellium
mmocore_max_stellium
mmocore_stellium_percentage
mmocore_party_count / mmocore_party_member_count
mmocore_guild_member_count
mmocore_exp
mmocore_max_exp
mmocore_level
mmocore_stat:arg
mmocore_temp_stat:arg
mmocore_claims:arg
mmocore_current_cooldown_slot:arg
mmocore_current_cooldown_skill:arg
mmocore_required_mana_skill:arg
mmocore_required_stamina_skill:arg
mmocore_skill_bound_index:arg
mmocore_skill_level:arg
mmocore_casting_slot:arg
MMOCore (return Boolean)
mmocore_is_casting_mode
mmocore_bounded_skill:arg
mmocore_bounded_slot:arg
mmocore_is_loaded
MMOItems (return String)
mmoitems_mainhand_skill:mode (ex. mmoitems_mainhand_skill:LEFT_CLICK)
MythicMobs (return String)
mythicmobs_caster_variable:arg
mythicmobs_target_variable:arg
mythicmobs_world_variable:arg
mythicmobs_entity_id
MythicMobs (return Number)
mythicmobs_current_cooldown:arg
mythicmobs_aura_stack:arg
mythicmobs_aura_max_duration:arg
mythicmobs_aura_duration:arg
mythicmobs_aura_duration_reversed:arg
MythicMobs (return Boolean)
mythicmobs_has_aura:arg
mythicmobs_is_mythicmob
WorldGuard (return Boolean)
worldguard_in_region:name
Vault (return Number)
vault_money
Skript (return String)
skript_variable:variable (ex. skript_variable:%{test::%uuid of hud player%}%)
Parties (return String)
parties_member:number
parties_member_exclude_mine:number
Parties (return Boolean)
parties_is_leader
Fabric
Default Listeners
health
vehicle_health
food
armor
air
exp
absorption
Default (return String)
name
gamemode
world
Default (return Number)
hotbar_slot
health
food
armor
max_health
absorption
max_health_with_absorption
health_percentage
last_health
last_health_percentage
level
air
max_air
potion_effect_duration:arg
vehicle_health
vehicle_max_health
vehicle_max_health_with_absorption
vehicle_health_percentage
vehicle_air
vehicle_max_air
popup-index
Default (return Boolean)
dead
frozen
burning
has_permission:arg
has_main_hand
has_off_hand
placeholder-api (return String)
placeholder_api_parse:arg
Velocity
Default (return String)
name
Default (return Number)
ping