1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
|
__NOTOC__
Each file inside the <code>quests</code> subfolder represents a single quest. The '''name''' of the file represents the '''quest id''' and must be alphanumeric (excluding the .yml extension).
An example can be seen with the [https://github.com/LMBishop/Quests/blob/master/bukkit/src/main/resources/resources/bukkit/quests/example1.yml default configuration].
== Table of contents ==
* [[Creating a quest#Quest ID|Quest ID]]
* [[Creating a quest#Tasks|Tasks]]
* [[Creating a quest#Display|Display]]
** [[Creating a quest#Name|Name]]
** [[Creating a quest#Normal lore|Normal lore]]
** [[Creating a quest#Started lore|Started lore]]
** [[Creating a quest#Type|Type]]
* [[Creating a quest#Rewards|Rewards]]
* [[Creating a quest#Start commands|Start commands]]
* [[Creating a quest#Start string|Start string]]
* [[Creating a quest#Reward string|Reward string]]
* [[Creating a quest#Placeholders|Placeholders]]
* [[Creating a quest#Options|Options]]
** [[Creating a quest#Category|Category]]
** [[Creating a quest#Requirements|Requirements]]
** [[Creating a quest#Permission required|Permission required]]
** [[Creating a quest#Cancellable|Cancellable]]
** [[Creating a quest#Counts towards limit|Counts towards limit]]
** [[Creating a quest#Repeatable|Repeatable]]
** [[Creating a quest#Cooldown|Cooldown]]
** [[Creating a quest#Time limit|Time limit]]
** [[Creating a quest#Sort order|Sort order]]
** [[Creating a quest#Autostart|Autostart]]
** [[Creating a quest#completed display|Completed display]]
** [[Creating a quest#cooldown display|Cooldown display]]
** [[Creating a quest#permission display|Permission display]]
** [[Creating a quest#locked display|Locked display]]
== Quest ID ==
The quest ID is the name of the file (excluding .yml extension) and must alphanumeric and unique. This ID is used as the reference in commands, players' quest progress file and in placeholders.
== Tasks ==
:''<code>tasks</code>''
Tasks are the objectives the player must do to complete the quest. Simalar to quest IDs, there are task IDs. They can be identical to the quest ID but must be unique to each other.
For help on adding the tasks, refer to [[Task configuration layout|task configuration layout]]
== Display ==
:''<code>display</code>''
This is the item which will be shown to the player in the quest GUI.
=== Name ===
:''<code>display.name</code>''
The name of the item. This is also the name used in chat messages.
```yaml
display:
name: "&cExample I (Single Task)"
```
=== Normal lore ===
:''<code>display.lore-normal</code>''
The lore (description) of the item as seen if the quest is not started.
```yaml
display:
...
lore-normal:
- "&cThis category is designed to show you the different"
- "&cattributes a quest can have."
- ""
- "&7This quest requires you to:"
- "&7 - Break &f30 blocks&7."
- ""
- "&7Rewards:"
- "&7 - &f10 &7diamonds."
```
=== Started lore ===
:''<code>display.lore-started</code>''
The lore (description) of the item '''appended to <code>lore-normal</code>''' if the quest is started. This is a good place to put progression details. To get the progression of a player in a task, write <code><nowiki>{TASKID:progress}</nowiki></code> and replace <code>TASKID</code> with the ID of the task you want to get the progress for. Alternatively, you can write <code><nowiki>{TASKID:complete}</nowiki></code> to get if the task is complete.
```yaml
display:
...
lore-started:
- ""
- "&7Your current progression:"
- "&7 - &f{mining:progress}&7/30 blocks broken."
```
=== Type ===
:''<code>display.type</code>''
The type (material name) of item.
```yaml
display:
...
type: "WOODEN_PICKAXE"
```
== Rewards ==
:''<code>rewards</code>''
'''Optional.''' This is a list of commands which will be executed when the player completes the quest. You can use <code><nowiki>{player}</nowiki></code> and the players name will be substituted in place.
```yaml
rewards:
- "give {player} diamond 10"
```
== Start commands ==
:''<code>startcommands</code>''
'''Optional.''' This is a list of commands which will be executed when the player starts the quest. You can use <code><nowiki>{player}</nowiki></code> and the player's name will be substituted in place.
```yaml
startcommands:
- "broadcast {player} has started a quest"
```
== Start string ==
:''<code>startstring</code>''
'''Optional.''' This is a list of messages which will be sent to the player when they start the quest. This is useful for telling the player their objectives.
```yaml
startstring:
- " &8- &7You must break 30 blocks."
```
== Reward string ==
:''<code>rewardstring</code>''
'''Optional.''' This is a list of messages which will be sent to the player when they complete the quest. This is useful for telling the player their rewards.
```yaml
rewardstring:
- " &8- &7You have received 10 dimaonds."
```
== Placeholders ==
:''<code>placeholders</code>''
'''Optional.''' This is a set of placeholders which can be accessed using PlaceholderAPI. To get the progression of a player in a task, write <code><nowiki>{TASKID:progress}</nowiki></code> and replace <code>TASKID</code> with the ID of the task you want to get the progress for. Alternatively, you can write <code><nowiki>{TASKID:complete}</nowiki></code> to get if the task is complete.
```yaml
placeholders:
description: "&7Break &f30 blocks &7of any type."
progress: " &8- &f{mining:progress}&7/30 broken"
```
These placeholders will be called using PlaceholderAPI. See [[Quest progress in scoreboard|quest progress in scoreboard]] for a guide which utilises this feature.
== Options ==
:''<code>options</code>''
This section defines quest-specific options.
=== Category ===
:''<code>options.category</code>''
'''Optional.''' The category the quest will be in. You should put the ID of the category here.
```yaml
options:
...
category: "example"
```
=== Requirements ===
:''<code>options.requires</code>''
'''Optional.''' List of Quest IDs the player must complete before being able to start this quest.
```yaml
options:
...
requires:
- "quest-id"
```
=== Permission required ===
:''<code>options.permission-required</code>''
'''Optional.''' Whether or not the quest should require a permission to start. The permission will be <code><nowiki>quests.quest.<id></nowiki></code>.
```yaml
options:
...
permission-required: false
```
=== Cancellable ===
:''<code>options.cancellable</code>''
'''Optional.''' Whether or not this quest can be cancelled. If global or local quest autostart is enabled, or is cancelling quests is disabled, then this option is ignored.
```yaml
options:
...
cancellable: false
```
=== Counts towards limit ===
:''<code>options.counts-towards-limit</code>''
'''Optional.''' Whether or not this quest counts towards the players quest started limit. If global quest autostart is enabled, this will have no effect as quest limits are disabled.
```yaml
options:
...
counts-towards-limit: false
```
=== Repeatable ===
:''<code>options.repeatable</code>''
'''Optional.''' Whether or not the quest can be replayed.
```yaml
options:
...
repeatable: false
```
=== Cooldown ===
:''<code>options.cooldown</code>''
'''Optional.''' Whether ot not the quest is placed on cooldown or is immediately replayable.
```yaml
options:
...
cooldown:
enabled: true
time: 1440 # minutes
```
=== Time limit ===
:''<code>options.time-limit</code>''
'''Optional.''' Whether or not this quest has a time limit to complete it. If the time limit is reached, the quest will be cancelled and progress reset.
```yaml
options:
...
time-limit:
enabled: true
time: 1440 # minutes
```
=== Sort order ===
:''<code>options.sort-order</code>''
'''Optional.''' How the plugin sorts the quests in the GUI, lower numbers come first.
```yaml
options:
...
sort-order: 1
```
=== Autostart ===
:''<code>options.autostart</code>''
'''Optional.''' Whether or not the quest should automatically be started. This is similar to enabling quest autostart for the entire plugin, but specific only to this quest, meaning it cannot be cancelled and counts towards the players quest started limit.
See [[Creating a quest#Counts towards limit|§ counts towards limit]] if you do not want autostart quests to count towards the quest started limit.
```yaml
options:
...
autostart: true
```
=== Completed display ===
:''<code>options.completed-display</code>''
'''Optional.''' The display item this quest should take if it is completed. This accepts the standard ItemStack definition format described in [[Defining items]]. If this option is not specified, the display item [[GUI-configuration#quest-completed-display|defined in the main config.yml]] will be used.
```yaml
options:
...
completed-display:
type: "STEAK"
```
=== Cooldown display ===
:''<code>options.cooldown-display</code>''
'''Optional.''' The display item this quest should take if it is on cooldown. This accepts the standard ItemStack definition format described in [[Defining items]]. If this option is not specified, the display item [[GUI-configuration#quest-cooldown-display|defined in the main config.yml]] will be used.
```yaml
options:
...
cooldown-display:
type: "STEAK"
```
=== Permission display ===
:''<code>options.permission-display</code>''
'''Optional.''' The display item this quest should take if the player does not have permission to start it. This accepts the standard ItemStack definition format described in [[Defining items]]. If this option is not specified, the display item [[GUI-configuration#quest-permission-display|defined in the main config.yml]] will be used.
```yaml
options:
...
permission-display:
type: "STEAK"
```
=== Locked display ===
:''<code>options.locked-display</code>''
'''Optional.''' The display item this quest should take if the player has not unlocked it. This accepts the standard ItemStack definition format described in [[Defining items]]. If this option is not specified, the display item [[GUI-configuration#quest-locked-display|defined in the main config.yml]] will be used.
```yaml
options:
...
locked-display:
type: "STEAK"
```
|