How to Use PlaceholderAPI with Skript
Connect placeholderapi skript together to use PAPI placeholders inside Skript scripts, register Skript variables as placeholders, and build dynamic features.
What You Need
To use placeholderapi skript together, you need three plugins: Skript, PlaceholderAPI, and the bridge addon skript-placeholders (or SkBee, which includes PAPI support). The bridge addon lets Skript read PAPI placeholders and register new ones.
# Required plugins
- Skript (latest stable)
- PlaceholderAPI
- skript-placeholders (or SkBee)
Install all three, restart the server, and confirm they load without errors in the console.
Reading PAPI Placeholders in Skript
With the bridge installed, you can parse any PlaceholderAPI placeholder inside a Skript expression.
command /mybalance:
trigger:
set {_bal} to placeholder "vault_eco_balance" from player
send "&aYour balance: &f$%{_bal}%" to player
The placeholder "..." from player syntax fetches the value of the specified placeholderapi skript expression for the given player. You can use any registered PAPI placeholder this way.
Using Placeholders in Conditions
on join:
set {_group} to placeholder "luckperms_primary_group" from player
if {_group} is "vip":
send title "&6Welcome back, VIP!" to player
Registering Skript Variables as Placeholders
The real power of placeholderapi skript integration is the ability to expose Skript data to other plugins. You can register a Skript variable as a PAPI placeholder so it appears in TAB, scoreboards, chat, and menus.
# Register a custom placeholder
on placeholder request for prefix "skript":
if the identifier is "kills":
set the result to "%{kills::%offline player's uuid%}%"
if the identifier is "deaths":
set the result to "%{deaths::%offline player's uuid%}%"
This creates %skript_kills% and %skript_deaths%, which other plugins can use like any standard PAPI placeholder.
Practical Example: Custom Kill Streak
Here is a complete script that tracks kill streaks and exposes them via PAPI:
on death of player:
attacker is a player
add 1 to {killstreak::%attacker's uuid%}
set {killstreak::%victim's uuid%} to 0
if {killstreak::%attacker's uuid%} >= 5:
broadcast "&c%attacker% is on a %{killstreak::%attacker's uuid%}% kill streak!"
on placeholder request for prefix "skript":
if the identifier is "killstreak":
set the result to "%{killstreak::%offline player's uuid%}% "
on quit:
set {killstreak::%player's uuid%} to 0
Now any plugin that supports PlaceholderAPI can display %skript_killstreak% on scoreboards, name tags, or chat prefixes.
Combining Multiple Placeholders
command /stats:
trigger:
set {_kills} to placeholder "statistic_kills" from player
set {_deaths} to placeholder "statistic_deaths" from player
set {_playtime} to placeholder "statistic_hours_played" from player
send "&7Kills: &f%{_kills}%"
send "&7Deaths: &f%{_deaths}%"
send "&7Hours played: &f%{_playtime}%"
This approach lets you pull data from any plugin into Skript and combine it however you want.
Troubleshooting
- Placeholder returns the raw text (e.g.,
%vault_eco_balance%): the expansion is not installed. Run/papi ecloud download Vaultand reload. - Bridge addon errors on startup: check version compatibility. skript-placeholders requires Skript 2.7+ and PAPI 2.11+.
- Registered placeholders not showing in
/papi list: make sure the Skript file is loaded. Run/sk reload <scriptname>. - Async parsing issues: Skript placeholders run on the main thread by default. Avoid slow operations inside placeholder request events.
For initial PlaceholderAPI setup, start with How to Set Up PAPI (PlaceholderAPI). For creating placeholders without Skript, see PlaceholderAPI, How to Make Your Own Placeholders.
Need hosting with full config access? Astroworld Hosting, Pterodactyl panel, NVMe SSDs, 24/7 support.