Skip to content

PlaceholderAPI Integration

Maxime Tonie edited this page Apr 11, 2026 · 1 revision

PlaceholderAPI Integration

PacketTrigger has two levels of PAPI support.


1. Using PAPI placeholders inside actions

If PlaceholderAPI is installed, any %papi_placeholder% from any expansion works inside your action fields. This includes things like Vault balance, player stats from other plugins, etc.

actions:
  - type: SEND_MESSAGE
    message: "&aYou gained {1} XP! Your balance is &e%vault_eco_balance%"
  - type: CONSOLE_COMMAND
    command: "somecommand %player% %someother_placeholder%"

2. Exposing PacketTrigger data to other plugins

PacketTrigger registers its own PAPI expansion under the identifier pt. This means any plugin that supports PAPI — TAB, scoreboards, holograms, chat formatters — can read the last values fired for any player.

Format

%pt_<triggerName>_<index>%

Examples

%pt_battlepass-xp_1%      →  last XP gained value for this player
%pt_battlepass-xp_2%      →  last total XP value for this player
%pt_quest-complete_1%     →  name of the last quest completed
%pt_quest-complete_2%     →  reward coins from the last quest

The trigger name is the config key — exactly as written in config.yml.

Using in TAB

In your TAB config you can show live data from PacketTrigger:

header: "&6XP this session: &e%pt_battlepass-xp_1%"

Important notes

  • The value stored is from the last time that trigger fired for that player
  • If the trigger has never fired for a player, the placeholder returns an empty string
  • Values persist until the server restarts or the player disconnects (data is not saved to disk)
  • PAPI must be installed for this to work — if it's not, %pt_...% placeholders will not be registered

Clone this wiki locally