Skip to content

Commit ae5500d

Browse files
committed
update wiki
1 parent eb86679 commit ae5500d

File tree

1 file changed

+152
-112
lines changed

1 file changed

+152
-112
lines changed

docs/epicachievements/configuration/05-rewards.mdx

Lines changed: 152 additions & 112 deletions
Original file line numberDiff line numberDiff line change
@@ -3,116 +3,9 @@ import TabItem from '@theme/TabItem';
33

44
# Rewards
55

6-
<Tabs>
7-
<TabItem value="new" label="v2.0" default>
8-
EpicAchievements offers a bunch of built-in reward types:
9-
10-
:::tip
11-
You can use the `{player}` and `{uuid}` placeholders in all rewards.
12-
:::
13-
14-
| Reward | Description | Required arguments |
15-
|---------------------|----------------------------------------------------------------------------------|-----------------------------|
16-
| `points` | Give achievement points to a player <br/> **Points are used to unlock rewards!** | `amount` |
17-
| `action_bar` | Send an action bar message | `message` |
18-
| `broadcast` | Broadcast a message to the server | `message` |
19-
| `command` | Execute a console command | `command` |
20-
| `experience_levels` | Give experience levels to a player | `amount` |
21-
| `experience` | Give experience points to a player | `amount` |
22-
| `item` | Give an item to a player | [`item`](../../item-format) |
23-
| `message` | Send a message to a player | `message` |
24-
| `title` | Send a title to a player | `title` `subtitle` |
25-
26-
### Plugin Hooks
27-
28-
| Plugin | Reward | Description | Required arguments |
29-
|-----------------------------------------------------------|-----------------|-------------------------|--------------------|
30-
| [Vault](https://www.spigotmc.org/resources/34315/) | `vault` | Give money to a player | `amount` |
31-
| [PlayerPoints](https://www.spigotmc.org/resources/80745/) | `player_points` | Give points to a player | `amount` |
32-
33-
## Customizing reward descriptions
34-
35-
Reward descriptions displayed in menus can be customized to override the default description defined in `rewards.yml`:
36-
```yaml showLineNumbers
37-
rewards:
38-
- type: points
39-
amount: 10
40-
# Override the default description
41-
# The {amount} placeholder is available
42-
description: "&8+ &7A nice gift!"
43-
```
44-
45-
## The reward leveling system
46-
47-
Using the points earned by completing achievements, players can unlock rewards. <br/>
48-
Below is an example configuration:
49-
50-
:::tip
51-
You can use the `{level}` placeholder to get the current level. <br/>
52-
Math expressions and functions are supported!
53-
:::
54-
55-
```yaml title="rewards.yml" showLineNumbers
56-
# Default descriptions for rewards.
57-
# You can hide a description for a reward by deleting it.
58-
reward-descriptions:
59-
# <reward-id>: "<description>"
60-
points: "&8+&e{amount} &7Achievement Points"
61-
vault: "&8+&e{amount} &7Coins"
62-
experience: "&8+&e{amount} &7Experience"
63-
experience_levels: "&8+&e{amount} &7Experience Levels"
64-
player_points: "&8+&e{amount} &7Coins"
65-
# Reward leveling system.
66-
levels:
67-
# A range of levels
68-
1-50:
69-
# Points required to unlock the reward. Math expressions are supported!
70-
required-points: "{level} * 100"
71-
# A list of rewards
72-
rewards:
73-
- type: vault
74-
amount: "{level} * 100"
75-
# Item displayed when the reward is locked
76-
locked:
77-
material: "COAL"
78-
name: "&cAchievement Reward"
79-
lore:
80-
- "&8Level {level}"
81-
- "&7Required Points: &e{points}"
82-
- ""
83-
- "&7Rewards:"
84-
- "{rewards}"
85-
- ""
86-
- "&cYou can't claim this yet!"
87-
# Item displayed when the reward has been claimed
88-
claimed:
89-
material: "GOLD_NUGGET"
90-
name: "&aAchievement Reward"
91-
lore:
92-
- "&8Level {level}"
93-
- "&7Required Points: &e{points}"
94-
- ""
95-
- "&7Rewards:"
96-
- "{rewards}"
97-
- ""
98-
- "&aYou have already claimed this reward!"
99-
# Item displayed when the reward has not been claimed
100-
unclaimed:
101-
material: "GOLD_NUGGET"
102-
name: "&eAchievement Reward"
103-
lore:
104-
- "&8Level {level}"
105-
- "&7Required Points: &e{points}"
106-
- ""
107-
- "&7Rewards:"
108-
- "{rewards}"
109-
- ""
110-
- "&eClick to claim this reward!"
111-
glow: true
112-
# Other levels can be added below
113-
```
114-
</TabItem>
115-
<TabItem value="old" label="v1.0">
6+
<details>
7+
<summary>Version 1.0</summary>
8+
<p>
1169
EpicAchievements offers a bunch of built-in rewards. <br/>
11710
Below is a list of them:
11811

@@ -188,5 +81,152 @@ import TabItem from '@theme/TabItem';
18881
glow: true
18982
# Other levels can be added below
19083
```
191-
</TabItem>
192-
</Tabs>
84+
</p>
85+
</details>
86+
87+
EpicAchievements offers a bunch of built-in reward types:
88+
89+
:::tip
90+
You can use the `{player}` and `{uuid}` placeholders in all rewards.
91+
:::
92+
93+
| Reward | Description | Required arguments |
94+
|---------------------|----------------------------------------------------------------------------------|-----------------------------|
95+
| `points` | Give achievement points to a player <br/> **Points are used to unlock rewards!** | `amount` |
96+
| `action_bar` | Send an action bar message | `message` |
97+
| `broadcast` | Broadcast a message to the server | `message` |
98+
| `command` | Execute a console command | `command` |
99+
| `experience_levels` | Give experience levels to a player | `amount` |
100+
| `experience` | Give experience points to a player | `amount` |
101+
| `item` | Give an item to a player | [`item`](../../item-format) |
102+
| `message` | Send a message to a player | `message` |
103+
| `title` | Send a title to a player | `title` `subtitle` |
104+
105+
### Plugin Hooks
106+
107+
| Plugin | Reward | Description | Required arguments |
108+
|-----------------------------------------------------------|-----------------|-------------------------|--------------------|
109+
| [Vault](https://www.spigotmc.org/resources/34315/) | `vault` | Give money to a player | `amount` |
110+
| [PlayerPoints](https://www.spigotmc.org/resources/80745/) | `player_points` | Give points to a player | `amount` |
111+
112+
## Customizing reward descriptions
113+
114+
Reward descriptions displayed in menus can be customized to override the default description defined in `rewards.yml`:
115+
```yaml showLineNumbers
116+
rewards:
117+
- type: points
118+
amount: 10
119+
# Override the default description
120+
# The {amount} placeholder is available
121+
description: "&8+ &7A nice gift!"
122+
```
123+
124+
## The reward leveling system
125+
126+
Using the points earned by completing achievements, players can unlock rewards. <br/>
127+
Multiple reward types can be defined: the example below includes `normal` and `special` rewards. <br/>
128+
129+
![rewards](https://imgur.com/rqs7ypW.png)
130+
131+
:::tip
132+
You can use the `{level}` placeholder to get the current level. <br/>
133+
Math expressions and functions are supported!
134+
:::
135+
136+
```yaml title="rewards.yml" showLineNumbers
137+
# Define below the rewards for each level.
138+
rewards:
139+
normal:
140+
levels:
141+
from: 1
142+
to: 48
143+
# (Optional) Define the increment between levels. Default is 1.
144+
# step: 1
145+
# Number of points required to claim the reward.
146+
required-points: "{level} * 100"
147+
# (Optional) If a level has multiple rewards defined, the one with the highest weight will be used.
148+
# weight: 1
149+
# The list of rewards.
150+
rewards:
151+
- type: vault
152+
amount: "{level} * 10"
153+
locked:
154+
material: "COAL"
155+
name: "&cNormal Achievement Reward"
156+
lore:
157+
- "&8Level {level}"
158+
- "&7Required Points: &e{points}"
159+
- ""
160+
- "&7Rewards:"
161+
- "{rewards}"
162+
- ""
163+
- "&cYou can't claim this yet!"
164+
claimed:
165+
material: "GOLD_NUGGET"
166+
name: "&aNormal Achievement Reward"
167+
lore:
168+
- "&8Level {level}"
169+
- "&7Required Points: &e{points}"
170+
- ""
171+
- "&7Rewards:"
172+
- "{rewards}"
173+
- ""
174+
- "&aYou have already claimed this reward!"
175+
unclaimed:
176+
material: "GOLD_NUGGET"
177+
name: "&eNormal Achievement Reward"
178+
lore:
179+
- "&8Level {level}"
180+
- "&7Required Points: &e{points}"
181+
- ""
182+
- "&7Rewards:"
183+
- "{rewards}"
184+
- ""
185+
- "&eClick to claim this reward!"
186+
glow: true
187+
188+
special:
189+
levels:
190+
from: 5
191+
to: 48
192+
step: 5
193+
required-points: "{level} * 100"
194+
weight: 2
195+
rewards:
196+
- type: vault
197+
amount: "{level} * 20"
198+
locked:
199+
material: "COAL_BLOCK"
200+
name: "&cSpecial Achievement Reward"
201+
lore:
202+
- "&8Level {level}"
203+
- "&7Required Points: &e{points}"
204+
- ""
205+
- "&7Rewards:"
206+
- "{rewards}"
207+
- ""
208+
- "&cYou can't claim this yet!"
209+
claimed:
210+
material: "GOLD_BLOCK"
211+
name: "&aSpecial Achievement Reward"
212+
lore:
213+
- "&8Level {level}"
214+
- "&7Required Points: &e{points}"
215+
- ""
216+
- "&7Rewards:"
217+
- "{rewards}"
218+
- ""
219+
- "&aYou have already claimed this reward!"
220+
unclaimed:
221+
material: "GOLD_BLOCK"
222+
name: "&eSpecial Achievement Reward"
223+
lore:
224+
- "&8Level {level}"
225+
- "&7Required Points: &e{points}"
226+
- ""
227+
- "&7Rewards:"
228+
- "{rewards}"
229+
- ""
230+
- "&eClick to claim this reward!"
231+
glow: true
232+
```

0 commit comments

Comments
 (0)