Skip to content

Commit 76fc90a

Browse files
committed
add action format
1 parent e6fbb75 commit 76fc90a

File tree

5 files changed

+85
-31
lines changed

5 files changed

+85
-31
lines changed

docs/guilds/placeholders/placeholderapi.md

Lines changed: 20 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -11,26 +11,26 @@ To have a Colored TAG use `%guilds_tag_color%` or `%guilds_tag_formatted%` place
1111
the config file.
1212
:::
1313

14-
| Placeholder | Description | Example |
15-
|--------------------------------------------------|---------------------------------------------------|--------------------------------------|
16-
| `%guilds_name%` | The player's guild name | LeoGuild |
17-
| `%guilds_uuid%` | The player's guild UUID | d8b46fa7-137e-4819-afca-58c5af49c01e |
18-
| `%guilds_level%` | The player's guild level | 1 |
19-
| `%guilds_xp%` | The player's guild experience | 1000 |
20-
| `%guilds_tag%` | The player's guild tag | LeoTag |
21-
| `%guilds_tag_color%` or `%guilds_tag_formatted%` | The player's guild tag, formatted | [LeoTag] <br/> |
22-
| `%guilds_members%` | Number of members in the player's guild | 5 |
23-
| `%guilds_online%` | Number of online members in the player's guild | 3 |
14+
| Placeholder | Description | Example |
15+
|--------------------------------------------------|--------------------------------------------|--------------------------------------|
16+
| `%guilds_name%` | Get the player's guild name | LeoGuild |
17+
| `%guilds_uuid%` | Get the player's guild uuid | d8b46fa7-137e-4819-afca-58c5af49c01e |
18+
| `%guilds_level%` | Get the player's guild level | 1 |
19+
| `%guilds_xp%` | Get the player's guild experience | 1000 |
20+
| `%guilds_tag%` | Get the player's guild TAG | LeoTag |
21+
| `%guilds_tag_color%` or `%guilds_tag_formatted%` | Tag from config `guild-tag.format` string | [LeoTag] <br/> |
22+
| `%guilds_members%` | Get the player's guild members SIZE | 5 |
23+
| `%guilds_online%` | Get the player's guild online members SIZE | 3 |
2424

2525
### Player Placeholders
2626

27-
| Placeholder | Description | Example |
28-
|--------------------------------|-------------------------------------------|---------------------------|
29-
| `%guilds_status%` | The player's guild status | Online |
30-
| `%guilds_rank%` | The player's rank in their guild | guildmaster |
31-
| `%guilds_rank_display_name%` | The display name of the player's rank | Guild Master |
32-
| `%guilds_rank_tag%` | The tag of the player's rank | GM |
33-
| `%guilds_rank_priority%` | The priority of the player's rank | 1 |
34-
| `%guilds_rank_members%` | Members with the same rank as the player | Player1, Player2, Player3 |
35-
| `%guilds_rank_members_online%` | Online members with the same rank | Player1, Player2 |
36-
| `%guilds_rank_formatted%` | The player's rank, formatted | [Guild Master] |
27+
| Placeholder | Description | Example |
28+
|--------------------------------|----------------------------------------------------|---------------------------|
29+
| `%guilds_status%` | Get the player's guild status (from config) | Online |
30+
| `%guilds_rank%` | Get the player's guild rank | guildmaster |
31+
| `%guilds_rank_display_name%` | Get the player's guild rank display name | Guild Master |
32+
| `%guilds_rank_tag%` | Get the player's guild rank TAG | GM |
33+
| `%guilds_rank_priority%` | Get the player's guild rank priority | 1 |
34+
| `%guilds_rank_members%` | Get the player's guild rank members (configurable) | Player1, Player2, Player3 |
35+
| `%guilds_rank_members_online%` | Get the player's guild rank members online | Player1, Player2 |
36+
| `%guilds_rank_formatted%` | Tag from config `guild-rank-tag.format` string | [Guild Master] |
Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,14 @@
11
---
22
title: Item Format
33
slug: /item-format
4+
id: item-format
45
---
56

67
Follow the format below to configure an item in config files.<br/>
78

89
:::warning
9-
**Guilds** uses a [different format](/guilds/configuration/menu-config) for items in the menu configuration!
10+
This format applies **only** to [**EpicAchievements**](/epicachievements) and [**Wool Wars**](/wool-wars).
11+
If you are using [**Guilds**](/guilds), please follow the [specific format guide here](/guilds/configuration/menu-config).
1012
:::
1113

1214
:::tip

docs/misc/02-action-format.md

Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
---
2+
title: Action Format
3+
slug: /action-format
4+
id: action-format
5+
---
6+
7+
:::warning
8+
This format applies **only** to [**EpicAchievements**](/epicachievements) and [**Wool Wars**](/wool-wars).
9+
:::
10+
11+
You can assign custom actions to any item defined in the menu configuration.
12+
13+
## Attaching actions to items
14+
15+
### Global Actions
16+
Actions will be executed on any type of click.
17+
18+
```yaml
19+
my-item:
20+
material: DIAMOND
21+
# ... other item properties ...
22+
actions:
23+
- "message:&aYou clicked the item!"
24+
- "console:give {player} diamond 1"
25+
```
26+
27+
### Specific Click Type Actions
28+
Supported click types: `left`, `right`, `shift-left`, `shift-right`.
29+
30+
```yaml
31+
my-item:
32+
material: DIAMOND
33+
# ... other item properties ...
34+
actions:
35+
left:
36+
- "message:&aYou left-clicked the item!"
37+
right:
38+
- "message:&aYou right-clicked the item!"
39+
shift-left:
40+
- "message:&aYou shift-left-clicked the item!"
41+
shift-right:
42+
- "message:&aYou shift-right-clicked the item!"
43+
```
44+
45+
## Action Types
46+
| Action | Description |
47+
|---------------------|-------------------------------------|
48+
| `message:<text>` | Sends a chat message to the player. |
49+
| `console:<command>` | Executes a console command. |
50+
| `command:<command>` | Executes a command as the player. |
51+
| `sound:<sound>` | Plays a sound to the player. |
52+
| `close` | Closes the menu. |
53+
54+
:::tip
55+
You can use the following placeholders in commands and messages:
56+
- `{player}` - The name of the player.
57+
- `{uuid}` - The UUID of the player.
58+
:::

docusaurus.config.js

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -81,16 +81,10 @@ const config = {
8181
],
8282
},
8383
{
84-
type: 'dropdown',
85-
label: 'Useful stuff',
84+
type: 'doc',
85+
label: 'Misc',
8686
position: 'left',
87-
items: [
88-
{
89-
type: 'doc',
90-
docId: 'useful-stuff/item-format',
91-
label: 'Item Format',
92-
},
93-
],
87+
docId: 'misc/item-format'
9488
},
9589
{
9690
href: 'https://pixelstudios.dev/github',

sidebars.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ const sidebars = {
55
woolwars: [{type: 'autogenerated', dirName: 'wool-wars'}],
66
guilds: [{type: 'autogenerated', dirName: 'guilds'}],
77
guildstasks: [{type: 'autogenerated', dirName: 'guilds-tasks'}],
8-
usefulstuff: [{type: 'autogenerated', dirName: 'useful-stuff'}]
8+
misc: [{type: 'autogenerated', dirName: 'misc'}]
99

1010
};
1111

0 commit comments

Comments
 (0)