PlaceholderAPI Integration
Complete guide to using PlaceholderAPI placeholders in AnnouncementGUI announcements.
📋 Overview
AnnouncementGUI seamlessly integrates with PlaceholderAPI (PAPI), allowing you to create dynamic announcements with player-specific or server-specific information.
🎯 What is PlaceholderAPI?
PlaceholderAPI is a plugin that provides a unified system for displaying dynamic information from various plugins. It allows you to use placeholders like %player_name% or %vault_eco_balance% in your announcements.
📦 Installation
🎨 Using Placeholders
Basic Syntax
Placeholders use this format:
%<identifier>_<value>%Examples:
%player_name%- Player's username%vault_eco_balance%- Player's economy balance%server_online%- Online player count
In Announcements
Simply include placeholders in your announcement messages.
Example 1: Welcome Message
Example 2: Server Stats
Example 3: Player Info
📚 Common Placeholders
Player Placeholders
Basic Player Info
Example Usage:
Server Placeholders
Server Statistics
Example Usage:
Economy Placeholders (Vault)
Requires:
Vault plugin
Economy plugin (e.g., EssentialsX, CMI)
Vault expansion:
/papi ecloud download Vault
Example Usage:
Permission Placeholders (LuckPerms)
Requires:
LuckPerms plugin
LuckPerms expansion:
/papi ecloud download LuckPerms
Example Usage:
Statistics Placeholders
Requires: Statistics expansion
Time Placeholders
Requires: Server expansion
🔧 Creating Dynamic Announcements
Example 1: Personalized Welcome
Goal: Welcome players with their name and balance.
Configuration:
Result:
Example 2: Rank-Based Messages
Goal: Show player's rank in announcements.
Configuration:
Result (for VIP):
Example 3: Server Status
Goal: Display current server statistics.
Configuration:
Example 4: Time-Based Greeting
Goal: Different greeting based on time.
Configuration:
Example 5: Achievement Encouragement
Goal: Show player progress.
Configuration:
⚡ Performance Considerations
Per-Player vs Broadcast Mode
AnnouncementGUI automatically detects placeholders and adjusts.
Broadcast Mode (No Placeholders):
Performance: Fast - one message for all players
Usage: Static announcements
Per-Player Mode (With Placeholders):
Performance: Slower - message parsed per player
Usage: Dynamic, personalized announcements
Optimization Tips
Use sparingly: Don't use placeholders in every announcement
Batch placeholders: Put all placeholders in one announcement
Cache-friendly: Use server placeholders (cached) over player-specific ones
Longer intervals: Use longer intervals for placeholder announcements
Example - Optimized:
🔍 Testing Placeholders
In-Game Testing
Test command:
Examples:
Common Placeholder Issues
📚 Expansion Library
Essential Expansions
Player
None
Player info (%player_name%, etc.)
Server
None
Server stats (%server_online%, etc.)
Vault
Vault + Economy
Economy balance, groups
LuckPerms
LuckPerms
Permissions, ranks
Statistics
None
Player statistics
Popular Expansions
EssentialsX
EssentialsX
Homes, warps, balance
CMI
CMI
Various CMI features
Factions
Factions
Faction info
mcMMO
mcMMO
Skill levels
Jobs
Jobs
Job levels, balance
Towny
Towny
Town info
WorldGuard
WorldGuard
Region info
Marriage
Marriage
Partner info
Clans
Clans
Clan info
Installing Expansions
Method 1: In-Game (Recommended)
Method 2: Manual Download
Visit https://api.extendedclip.com/expansions/
Download expansion JAR
Place in
plugins/PlaceholderAPI/expansions//papi reload
🎨 Advanced Techniques
Conditional Placeholders
Some expansions support conditional logic.
Example with Parse expansion:
Mathematical Operations
Example with Math expansion:
Relational Placeholders
Show info about two players:
JavaScript Placeholders
Example with JavaScript expansion:
🔧 Troubleshooting
Debug Mode
Enable debug mode in PlaceholderAPI config:
config.yml:
Then check console for placeholder parsing details.
Common Problems
📖 Best Practices
Test Before Deploying
Always test placeholders:
Use Descriptive Names
Balance Performance
Mix static and dynamic announcements
Don't overuse placeholders
Use appropriate intervals
Keep Expansions Updated
Document Dependencies
Keep a list of required expansions:
Fallback Values
Some placeholders return empty when unavailable. Plan for this:
📝 Example Announcement Pack
🔗 Resources
Official Links
PlaceholderAPI: https://github.com/PlaceholderAPI/PlaceholderAPI
Wiki: https://wiki.placeholderapi.com/
eCloud: https://api.extendedclip.com/expansions/
Discord: https://helpch.at/discord