-
Notifications
You must be signed in to change notification settings - Fork 25
/
Copy pathExampleAdvanced.yml
426 lines (379 loc) · 11.6 KB
/
ExampleAdvanced.yml
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
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
# This is a reward file
# Define rewards in here (Items, commands, etc)
# File name is the reward name, without file extention
# This reward is named "ExampleAdvanced"
# That is what you put as a reward for other plugins, like VotingPlugin
# DO NOT HAVE DUPLICATE NAMES!!
# Do not use ExampleBasic or ExampleAdvanced as rewards, they are disabled from loading!
# Wiki Page:
# https://github.com/BenCodez/AdvancedCore/wiki/Reward-files
# You can just remove values you don't want (just delete it)
# If you just want money just have a reward file containg only "Money: 100", for example
# Don't use this file as a reward, example only
# This is the advanced example, if you only want an item or command then look
# at the basic example, you can simply copy and paste from here what you want
# in other reward files, that is the way they are designed
# This will delay the reward file from running
Delayed:
Enabled: false
Hours: 1
Minutes: 0
Seconds: 0
MilliSeconds: 0
# Specific time of day to give this reward file
# in 24 hour time, relative to local time zone
Timed:
Enabled: false
Hour: 12
Minute: 0
# Chance out of 100
# Set to 0 or 100 for always, or delete this line to disable chance
# Will not give any rewards unless chance is lucky or disabled
Chance: 40
# Item conditional example
Items:
Item1:
# Javacript for conditional
# Uses return value to get item info (can be anything, like numbers)
ConditionalJavascript: 'User.canVoteAll()'
Conditional:
false:
Material: 'REDSTONE_BLOCK'
Amount: 1
true:
Material: 'EMERALD_BLOCK'
Amount: 1
# Player must be with a certain distance of said location
#LocationDistance:
# World: world
# X: 0
# Y: 0
# Z: 0
# Distance: 10
# Will give one command from the list
RandomCommand: []
# Will give one reward from the list of rewards
RandomReward: []
# Works similar to RandomReward above, just avoids reward files
# Similar style to AdvancedPriority
AdvancedRandomReward:
reward1:
Commands:
- say reward1
reward2:
Commands:
- say reward2
reward3:
Commands:
- say reward3
# Give one of the following items
RandomItem:
Diamond:
Material: DIAMOND
Amount: 1
Iron:
Material: IRON_INGOT
Amount: 10
# Require permission to give this reward file
# Permission is AdvancedCore.Reward.(REWARDNAME) by default
# E.g: AdvancedCore.Reward.ExampleAdvanced
RequirePermission: false
# Permission that must be required if RequirePermission is true
# Add ! in front to make it only run when permission isn't there instead
Permission: 'AdvancedCore.Reward.ExampleAdvanced'
#TempPermission:
# Permission: 'PERMISSIONHERE'
# # Time in seconds
# Expiration: 60
# Amount of time to still allow the reward to be executed
# if reward is saved offline
# Time in minutes
#RewardExpiration: 1440
# DayOfMonth requirement configuration
DayOfMonth:
# Enable or disable the DayOfMonth requirement
Enabled: false
# List of days of the month when the requirement should be met
Days:
- 1
- 15
# Javascript
# Only use this if you know what you are doing
#
# Bukkit API placeholders:
# Using "BukkitServer" in your javascript will return Bukkit.getServer()
# You can use any methods inside of the Server class
# Example: BukkitServer.getBannedPlayers().size().toFixed()
#
# "BukkitPlayer" in your javascript will return the Player object of the player getting the reward
# You can use any methods inside of the Player class
# Example: BukkitPlayer.hasPermission("some.permission")
Javascript:
Enabled: false
Expression: ''
# Reward files to run if expression is true
TrueRewards: {}
# Reward files to run if expression is false
FalseRewards: {}
# Do things like set health or other things
# not possible with commands
Javascripts: []
# Javascript expression which must be true in order to give this reward
JavascriptExpression: ''
# List of reward files to try and execute
# Will only execute first possible reward that can be given
# Recommend using AdvancedPriority (same thing but can avoid having multiple files)
Priority: []
# Advanced example
# 50% chance for reward1, if reward1 not given then 20% chance to get reward2, if reward2 not given then fallback
AdvancedPriority:
# Similar to priority, but no need to have to use reward files
# Add requirements under each reward
# Will go in order from list here and try to run each of the following rewards...
# This name can be anything, but they need to be different
Reward1:
Chance: 50
# Any other requirement here
# If any requirement fails, the next will be attempted
Messages:
Player: 'You got first reward'
Reward2:
Chance: 20
Messages:
Player: 'You got second reward'
# Fallback, 100% chance
Fallback:
Messages:
Player: 'You got unlucky'
# Give rewards based on what world the player is on
AdvancedWorld:
world:
Commands:
- say %player% in world
world_nether:
Commands:
- say %player% in nether
# List of rewards to run, works similar to AdvancedPriority, but runs all rewards
#AdvancedRewards:
# Reward1:
# Commands:
# - say test
# Special chance
# percentage is caculated with all numbers added up
# E.g. below:
# Total is 100, so 5 is 5 out of 100, and so on
# The number represents a weight value essentially
# Decimals are allowed as well, just use _ as the decimal
# no duplicates numbers allowed
SpecialChance:
5:
# rewards here
Commands:
- say 5
15:
Commands:
- say 15
30:
Commands:
- say 30
50:
Commands:
- say 50
# Let the user pick a reward file to get
# User can only pick one
EnableChoices: false
Choices:
Diamond:
DisplayItem:
Name: '&c3 Diamonds'
Material: DIAMOND
Amount: 3
Rewards:
Items:
Diamond:
Material: 'DIAMOND'
Amount: 3
Messages:
Player: '&aYou picked %choice%'
Iron:
DisplayItem:
Name: '&c15 Iron Ingots'
Material: IRON_INGOT
Amount: 15
Rewards:
Items:
Iron:
Material: 'IRON_INGOT'
Amount: 15
Messages:
Player: '&aYou picked %choice%'
# Will execute rewards in one of the given worlds when player is in world
Worlds:
- 'world1'
- 'world2'
# Reward will never execute in the worlds below
# Similar to Worlds, but in reverse
BlackListedWorlds:
- 'world3'
- 'world4'
# Reward type
# Possible Values: ONLINE,OFFLINE,BOTH
# Default: BOTH
# Make this reward file only give rewards depending
# if player was online/offline when the reward attempted to give
RewardType: 'BOTH'
# If true, reward file will execute even if player is offline
# Does not support all rewards
# ONLY USE THIS IF YOU KNOW WHAT YOU ARE DOING
ForceOffline: false
# Vault group required to get reward
#VaultGroup: 'NORMAL'
# Potions to give on reward
Potions:
# Potion effect name
# Potions can be found here:
# https://hub.spigotmc.org/javadocs/spigot/org/bukkit/potion/PotionEffectType.html
ABSORPTION:
# Duration in seconds
Duration: 100
# Amplifier
Amplifier: 1
# Title to send to player
Title:
Enabled: false
Title: '&cTitle!'
SubTitle: '&aSubTitle!'
FadeIn: 10
ShowTime: 50
FadeOut: 10
# Send bossbar to player
# This requires 1.9+
BossBar:
Enabled: false
# Message to send
Message: '&aBossbar'
# Bar Colors:
# https://hub.spigotmc.org/javadocs/spigot/org/bukkit/boss/BarColor.html
Color: 'BLUE'
# Bar Styles:
# https://hub.spigotmc.org/javadocs/spigot/org/bukkit/boss/BarStyle.html
Style: 'SOLID'
# Precentage for bar
Progress: 0.50
# Delay until bar goes away (in ticks)
Delay: 30
# Sound on reward
Sound:
# Enable or Disable Sound
Enabled: false
# Sound to play
# 1.9 Sounds: https://hub.spigotmc.org/javadocs/spigot/org/bukkit/Sound.html
# 1.8: https://jd.bukkit.org/org/bukkit/Sound.html
Sound: 'BLOCK_ANVIL_USE'
# Volume
# Range: 0.0 to 1.0
Volume: 1.0
# Pitch
# Range: 0.0 to 2.0
Pitch: 1.0
# Play particle effect on reward
# 1.10 Effects can be found here:
# https://hub.spigotmc.org/javadocs/spigot/org/bukkit/Effect.html
Effect:
Enabled: false
Effect: 'EXPLOSION_NORMAL'
# Ususally speed
Data: 1
Particles: 10
Radius: 5
Firework:
Enabled: false
Power: 2
# Colors can be found here:
# https://hub.spigotmc.org/javadocs/spigot/org/bukkit/DyeColor.html
Colors:
- BLUE
#- #123123 hex color code format
FadeOutColor:
- RED
Trail: true
Flicker: true
# Types can be found here:
# https://hub.spigotmc.org/javadocs/spigot/org/bukkit/FireworkEffect.Type.html
Types:
- BALL_LARGE
# Detonate firework instantly
Detonate: false
# Send action bar
ActionBar:
Message: '&cThis is an actionbar!'
# Delay until action bar goes away (in ticks)
Delay: 30
# Lucky rewards
OnlyOneLucky: false
# The example below would give a 1 in 10 chance of receiving an extra $100, and a 1 in 50 chance of an extra $1000.
Lucky:
'10':
Messages:
Player: 'You were lucky and received an extra $100!'
Money: 100
'50':
Messages:
Player: 'You were lucky and received an extra $1000!'
Money: 1000
# Only for some GUI's
# Required for choice rewards
# not a reward
DisplayItem:
Material: 'DIAMOND'
Name: '&aAdvancedReward'
Amount: 1
# Ability for server option
# Makes sure the correct server gets the reward
#Server: 'Minecraft Server'
# List of servers that will prevent the reward from running on, such as a hub/lobby server
#BlockedServers:
#- lobby
#############################################
# RECOMMEND using AdvancedPriority
# as it easier to use
#############################################
#
# Advanced Random Rewards, just ignore this if you don't want fancy chance rewards
# This is to give random rewards, with fallback
# Rewards defined in this reward file below are still given regardless of this below
Random:
# Chance to give a randomly selected reward below (from list), will only give random reward
# if lucky (according to chance)
# Works same as chance above
Chance: 40
# If this value is true it will pick a random reward in the Rewards list
# if false, all rewards are given
# Value is true if not specified
# Can also use RandomReward (a few lines below) to give a random reward only
PickRandom: true
# Rewards if chance is lucky, can be random depending in option above
# Don't set this reward as a possible reward, may cause infinite loop
Rewards: []
# A list of fall back rewards if chance is unlucky
# Don't set this reward as a reward, may cause infinite loop
FallBack: []
################################################
# REPEAT REWARDS
# Meant for advanced uses
# Rewards do not persist on shutdown (unless enabled)
# Not tested in all situations yet, use at your own risk
################################################
Repeat:
Enabled: true
# Time in milliseconds 1000 = 1 second
TimeBetween: 60000
# Number of times to repeat
# set to -1 for no limit
Amount: -1
# Start repeating on startup, otherwise it will only repeat when reward is given
# If true, the reward will not repeat when executed
# Will execute for every player online at time of execution
RepeatOnStartup: false
# If any reward requirement fails to pass, the reward will stop repeating
AutoStop: true