Skip to content
Merged
Show file tree
Hide file tree
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions content/docs/serviceio/meta.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
"---Introduction---",
"index",
"faq",
"placeholders",
"---Guide---",
"manage",
"presets",
Expand Down
127 changes: 127 additions & 0 deletions content/docs/serviceio/placeholders.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,127 @@
---
title: Placeholders
description: PlaceholderAPI integration for ServiceIO
icon: Variable
---

import { Callout } from "fumadocs-ui/components/callout"

<Callout title="Requirements">
ServiceIO v2.3.1+ and [PlaceholderAPI](https://github.com/PlaceholderAPI/PlaceholderAPI) are required for placeholder support.
</Callout>

ServiceIO provides PlaceholderAPI integration, allowing you to use ServiceIO data in other plugins that support placeholders.

## Placeholder Format

All ServiceIO placeholders follow the format:
```
%serviceio_<placeholder>%
```

## Available Placeholders

### Player Information
- `%serviceio_prefix%` - Player's prefix from the permission service
- `%serviceio_suffix%` - Player's suffix from the permission service
- `%serviceio_displayname%` - Player's display name

### Economy (Standard)
- `%serviceio_balance%` - Player's current balance (raw number)
- `%serviceio_balance_<world>%` - Player's balance in a specific world (raw number)
- `%serviceio_balance_formatted%` - Player's current balance (formatted with currency)
- `%serviceio_balance_formatted_<world>%` - Player's balance in a specific world (formatted with currency)

<Callout title="Economy Placeholders">
Economy placeholders require an economy service provider to be installed and configured with ServiceIO.
</Callout>

### Economy (Bank System)
- `%serviceio_bank%` - Name of the player's current bank
- `%serviceio_bank_balance%` - Player's current bank balance (raw number)
- `%serviceio_bank_balance_formatted%` - Player's current bank balance (formatted with currency)
- `%serviceio_bank_<world>%` - Name of the player's bank in a specific world
- `%serviceio_bank_<world>_balance%` - Bank balance in a specific world (raw number)
- `%serviceio_bank_<world>_balance_formatted%` - Bank balance in a specific world (formatted with currency)
- `%serviceio_banks%` - List of all available banks (comma-separated)
- `%serviceio_banks_<world>%` - List of banks available in a specific world (comma-separated)

<Callout title="Bank Placeholders">
Bank placeholders require an economy service provider with bank support to be installed and configured with ServiceIO.
</Callout>

### Permission Groups
- `%serviceio_group%` - Player's primary permission group
- `%serviceio_groups%` - All of player's permission groups (comma-separated)

### VaultUnlocked Compatibility

ServiceIO also provides VaultUnlocked-compatible placeholders using the `%vaultunlocked_*%` format for advanced economy features:

- `%vaultunlocked_balance%` - Player's balance
- `%vaultunlocked_balance_<world>%` - Balance in a specific world
- `%vaultunlocked_balanceformatted%` - Formatted balance
- `%vaultunlocked_balance_currency_<currency>%` - Balance in a specific currency
- `%vaultunlocked_accounts%` - List of accounts the player is a member of
- `%vaultunlocked_accounts_count%` - Number of accounts the player belongs to

<Callout title="VaultUnlocked Placeholders">
Copy link
Member

@NonSwag NonSwag Sep 12, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

info type

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added type="info" to VaultUnlocked Placeholders callout in commit 6db60d1

VaultUnlocked placeholders provide advanced multi-currency and account management features. See the [VaultUnlocked documentation](https://github.com/TheNewEconomy/VaultUnlocked) for the complete list of available placeholders.
</Callout>

## Usage Examples

### In Chat Formats
```yaml
# Example chat format using ServiceIO placeholders
format: "%serviceio_prefix%%player_name%%serviceio_suffix%: %message%"
```

### In Scoreboards
```yaml
# Example scoreboard using economy data
title: "Server Info"
lines:
- "Balance: %serviceio_balance_formatted%"
- "Bank: %serviceio_bank_balance_formatted%"
- "Rank: %serviceio_group%"
```

### World-Specific Economy
```yaml
# Show balance for specific world
balance-message: "Your balance in %world%: %serviceio_balance_formatted_world%"

# Bank balance in a specific world
bank-info: "Your bank in the nether: %serviceio_bank_nether_balance_formatted%"
```

### Multi-Bank Setup
```yaml
# List all available banks
bank-list: "Available banks: %serviceio_banks%"

# Show player's current bank
current-bank: "Your current bank: %serviceio_bank%"
```

### In MOTD or Other Text
```yaml
# Welcome message with player data
welcome-message: "Welcome %serviceio_displayname%! Your balance: %serviceio_balance_formatted%"

# Group-based welcome
group-welcome: "Hello %serviceio_prefix%%player_name%! You belong to: %serviceio_groups%"
```

## Troubleshooting

<Callout type="error" title="Placeholder Not Working?">
Ensure that:
1. ServiceIO v2.3.1+ is installed
2. PlaceholderAPI is installed and enabled
3. The relevant service provider (economy, permissions) is installed and working
4. ServiceIO has successfully detected and registered the service provider
</Callout>

If a placeholder returns empty or default values, check your ServiceIO configuration and ensure the appropriate service providers are properly installed and configured.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

there will never be "default values"
there is only improper placeholder usage (not formatted and shows the literal placeholder)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Updated troubleshooting text to clarify that placeholders show literal text instead of expected values when improperly used, rather than mentioning "default values" in commit 6db60d1

Loading