Skip to content

Commit 26f9a55

Browse files
authored
Merge pull request #98 from TheNextLvl-net/copilot/fix-97
Add comprehensive ServiceIO PlaceholderAPI documentation
2 parents 2a3c226 + 4bd82f2 commit 26f9a55

File tree

3 files changed

+123
-3
lines changed

3 files changed

+123
-3
lines changed
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
"pages": ["placeholders", "..."]
3+
}
Lines changed: 119 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,119 @@
1+
---
2+
title: Placeholders
3+
description: PlaceholderAPI integration for ServiceIO
4+
icon: Variable
5+
---
6+
7+
8+
9+
<Callout title="Requirements">
10+
ServiceIO v2.3.0+ and [PlaceholderAPI](https://modrinth.com/project/lKEzGugV) are required for placeholder support.
11+
</Callout>
12+
13+
ServiceIO provides PlaceholderAPI integration, allowing you to use ServiceIO data in other plugins that support placeholders.
14+
15+
## Placeholder Format
16+
17+
All ServiceIO placeholders follow the format:
18+
```
19+
%serviceio_<placeholder>%
20+
```
21+
22+
## Available Placeholders
23+
24+
### Player Information
25+
- `%serviceio_prefix%` - Player's prefix from the permission service
26+
- `%serviceio_suffix%` - Player's suffix from the permission service
27+
- `%serviceio_displayname%` - Player's display name
28+
29+
### Economy
30+
- `%serviceio_balance%` - Player's current balance (raw number)
31+
- `%serviceio_balance_<world>%` - Player's balance in a specific world (raw number)
32+
- `%serviceio_balance_formatted%` - Player's current balance (formatted with currency)
33+
- `%serviceio_balance_formatted_<world>%` - Player's balance in a specific world (formatted with currency)
34+
35+
<Callout type="info" title="Economy Placeholders">
36+
Economy placeholders require an economy service provider to be installed and configured with ServiceIO.
37+
</Callout>
38+
39+
### Banking
40+
- `%serviceio_bank%` - Name of the player's current bank
41+
- `%serviceio_bank_balance%` - Player's current bank balance (raw number)
42+
- `%serviceio_bank_balance_formatted%` - Player's current bank balance (formatted with currency)
43+
- `%serviceio_bank_<world>%` - Name of the player's bank in a specific world
44+
- `%serviceio_bank_<world>_balance%` - Bank balance in a specific world (raw number)
45+
- `%serviceio_bank_<world>_balance_formatted%` - Bank balance in a specific world (formatted with currency)
46+
- `%serviceio_banks%` - List of all available banks (comma-separated)
47+
- `%serviceio_banks_<world>%` - List of banks available in a specific world (comma-separated)
48+
49+
<Callout type="info" title="Bank Placeholders">
50+
Bank placeholders require an economy service provider with bank support to be installed and configured with ServiceIO.
51+
</Callout>
52+
53+
### Permission Groups
54+
- `%serviceio_group%` - Player's primary permission group
55+
- `%serviceio_groups%` - All of player's permission groups (comma-separated)
56+
57+
### VaultUnlocked Compatibility
58+
59+
ServiceIO also provides VaultUnlocked placeholders using the `%vaultunlocked_<placeholder>%` format for compatibility reasons:
60+
61+
- `%vaultunlocked_balance%` - Player's balance
62+
- `%vaultunlocked_balance_<world>%` - Balance in a specific world
63+
- `%vaultunlocked_balanceformatted%` - Formatted balance
64+
- `%vaultunlocked_balance_currency_<currency>%` - Balance in a specific currency
65+
- `%vaultunlocked_accounts%` - List of accounts the player is a member of
66+
- `%vaultunlocked_accounts_count%` - Number of accounts the player belongs to
67+
68+
<Callout type="info" title="VaultUnlocked Placeholders">
69+
See the [VaultUnlocked documentation](https://github.com/TheNewEconomy/VaultUnlocked?tab=readme-ov-file#-vaultunlocked-placeholderapi-placeholders-uuid-based) for the complete list of available placeholders.
70+
</Callout>
71+
72+
## Usage Examples
73+
74+
### In Chat Formats
75+
```yaml
76+
# Example chat format using ServiceIO placeholders
77+
format: "%serviceio_prefix%%player_name%%serviceio_suffix%: %message%"
78+
```
79+
80+
### In Scoreboards
81+
```yaml
82+
# Example scoreboard using economy data
83+
title: "Server Info"
84+
lines:
85+
- "Balance: %serviceio_balance_formatted%"
86+
- "Bank: %serviceio_bank_balance_formatted%"
87+
- "Rank: %serviceio_group%"
88+
```
89+
90+
### World-Specific Economy
91+
```yaml
92+
# Show balance for specific world
93+
balance-message: "Your balance in %world%: %serviceio_balance_formatted_world%"
94+
95+
# Bank balance in a specific world
96+
bank-info: "Your bank in the nether: %serviceio_bank_nether_balance_formatted%"
97+
```
98+
99+
### Multi-Bank Setup
100+
```yaml
101+
# List all available banks
102+
bank-list: "Available banks: %serviceio_banks%"
103+
104+
# Show player's current bank
105+
current-bank: "Your current bank: %serviceio_bank%"
106+
```
107+
108+
## Troubleshooting
109+
110+
<Callout type="error" title="Placeholder Not Working?">
111+
Ensure that:
112+
1. ServiceIO v2.3.0+ is installed (`/version ServiceIO`)
113+
2. [PlaceholderAPI](https://modrinth.com/project/lKEzGugV) is installed and enabled
114+
3. The relevant service provider (economy, permissions...) is installed and working
115+
4. ServiceIO has successfully detected the service provider (`/service info`)
116+
5. There is no typo in the placeholder and it is properly used (`%serviceio_<placeholder>%`)
117+
</Callout>
118+
119+
If a placeholder shows the literal placeholder text instead of the expected value, check your configuration and ensure the appropriate service providers are properly installed and configured.

content/docs/serviceio/meta.json

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,7 @@
1313
"index",
1414
"faq",
1515
"---Guide---",
16-
"manage",
17-
"presets",
18-
"per-worlds",
16+
"guide/placeholders",
1917
"---For Developers---",
2018
"api/repository",
2119
"api/index"

0 commit comments

Comments
 (0)