Config & Modifications
Configuration Files
NDailyRewards provides a range of configuration files for you to use. This section will detail the configuration files that NDailyRewards have.
config.yml
# ███╗░░██╗██████╗░░█████╗░██╗██╗░░░░░██╗░░░██╗██████╗░███████╗░██╗░░░░░░░██╗░█████╗░██████╗░██████╗░░██████╗
# ████╗░██║██╔══██╗██╔══██╗██║██║░░░░░╚██╗░██╔╝██╔══██╗██╔════╝░██║░░██╗░░██║██╔══██╗██╔══██╗██╔══██╗██╔════╝
# ██╔██╗██║██║░░██║███████║██║██║░░░░░░╚████╔╝░██████╔╝█████╗░░░╚██╗████╗██╔╝███████║██████╔╝██║░░██║╚█████╗░
# ██║╚████║██║░░██║██╔══██║██║██║░░░░░░░╚██╔╝░░██╔══██╗██╔══╝░░░░████╔═████║░██╔══██║██╔══██╗██║░░██║░╚═══██╗
# ██║░╚███║██████╔╝██║░░██║██║███████╗░░░██║░░░██║░░██║███████╗░░╚██╔╝░╚██╔╝░██║░░██║██║░░██║██████╔╝██████╔╝
# ╚═╝░░╚══╝╚═════╝░╚═╝░░╚═╝╚═╝╚══════╝░░░╚═╝░░░╚═╝░░╚═╝╚══════╝░░░╚═╝░░░╚═╝░░╚═╝░░╚═╝╚═╝░░╚═╝╚═════╝░╚═════╝░
# Discord server: https://discord.gg/p7cxhw7E2M
# Modrinth: https://modrinth.com/plugin/ndailyrewards
# General settings
check-updates: true
# Database configuration
database:
# Select here the database you want to use
# The following databases are supported:
# - sqlite - (default) stores all data in a local file
# - mariadb - allows using a remote database
type: sqlite
# SQLite configuration
sqlite:
file: "ndailyrewards.db"
# MariaDB configuration
mariadb:
jdbc: "jdbc:mariadb://localhost:3306/ndailyrewards"
username: "root"
password: "password"
# Advanced configuration for Database (do not touch unless you know what you are doing)
# Comment out any data source property to disable setting it.
cachePrepStmts: true
prepStmtCacheSize: 250
prepStmtCacheSqlLimit: 2048
useServerPrepStmts: true
useLocalSessionState: true
rewriteBatchedStatements: true
cacheResultSetMetadata: true
cacheServerConfiguration: true
elideSetAutoCommits: true
maintainTimeStats: false
# Player events
events:
# Whether a reward should automatically claim when a player joins (if available)
auto-claim-reward: false
# Delay in seconds before the reward is automatically claimed
auto-claim-delay: 10
# When player joins the server, should plugin open the reward GUI?
open-gui-when-available: false
# When player joins the server, should plugin notify player about available rewards?
notify-when-available: true
# Rewards configuration
rewards:
# When a player reaches the day limit, should it reset to the first day?
reset-when-all-claimed: true
# When player joins server for the first time, should the reward be available?
first-join-reward: false
# Specify how many days the player has to wait to claim the reward again (in hours)
cooldown: 24
# Should next day unlock after midnight?
unlock-after-midnight: false
# Available actions:
# [console] - entered statement will be executed from console
# [player] - statement performed as player command execution
# [message] - messages the player with specified text
# [actionbar] - shows the text in actionbar for the player
# [title] - sends primary title with entered text
# [subtitle] - sends secondary title with entered text
# [sound] - plays specified sound for the player (sound:volume:pitch)
# [permission] {ndailyrewards.permission} - checks if player has permission
# [luck] {0-100} - executes the statement with a specified chance (0-100)
# [close] - closes the inventory for the player
# You can also use PlaceholderAPI placeholders (requires PlaceholderAPI plugin)
# Note: First slot in inventory is 0, not 1
days:
"1":
position: 10
lore:
- "&7&lRewards:"
- "&6- &e1x &6Diamond"
actions:
- "[console] give <player> diamond 1"
- "[message] &6You have claimed your reward!"
- "[sound] ENTITY_EXPERIENCE_ORB_PICKUP:1:1"
"2":
position: 11
lore:
- "&7&lRewards:"
- "&6- &e2x &6Diamond"
actions:
- "[console] give <player> diamond 2"
- "[message] &6You have claimed your reward!"
- "[sound] ENTITY_EXPERIENCE_ORB_PICKUP:1:1"
"3":
position: 12
lore:
- "&7&lRewards:"
- "&6- &e3x &6Diamond"
actions:
- "[console] give <player> diamond 3"
- "[message] &6You have claimed your reward!"
- "[sound] ENTITY_EXPERIENCE_ORB_PICKUP:1:1"
"4":
position: 13
lore:
- "&7&lRewards:"
- "&6- &e4x &6Diamond"
actions:
- "[console] give <player> diamond 4"
- "[message] &6You have claimed your reward!"
- "[sound] ENTITY_EXPERIENCE_ORB_PICKUP:1:1"
"5":
position: 14
lore:
- "&7&lRewards:"
- "&6- &e5x &6Diamond"
actions:
- "[console] give <player> diamond 5"
- "[message] &6You have claimed your reward!"
- "[sound] ENTITY_EXPERIENCE_ORB_PICKUP:1:1"
"6":
position: 15
lore:
- "&7&lRewards:"
- "&6- &e6x &6Diamond"
actions:
- "[console] give <player> diamond 6"
- "[message] &6You have claimed your reward!"
- "[sound] ENTITY_EXPERIENCE_ORB_PICKUP:1:1"
"7":
position: 16
lore:
- "&7&lRewards:"
- "&6- &e7x &6Diamond"
actions:
- "[console] give <player> diamond 7"
- "[message] &6You have claimed your reward!"
- "[sound] ENTITY_EXPERIENCE_ORB_PICKUP:1:1"
gui:
reward:
title: "&6Daily Rewards"
size: 27
display:
available:
material: "EMERALD_BLOCK:1"
name: "&aDay <dayNum>"
lore:
- "&7Your Reward Awaits"
- "&7Click Me to claim your prize!"
- ""
- "<reward-lore>"
claimed:
material: "COAL_BLOCK:1"
name: "&aDay <dayNum>"
lore:
- "&7You have claimed this reward"
- ""
- "<reward-lore>"
next:
material: "COAL_BLOCK:1"
name: "&aDay <dayNum>"
lore:
- "&7Your Reward Will Be Here Soon"
- "&7Wait <time-left>"
- ""
- "<reward-lore>"
unavailable:
material: "BARRIER:1"
name: "&aDay <dayNum>"
lore:
- "&7You have not reached this day yet"
- ""
- "<reward-lore>"
filler:
enable: true
material: "GRAY_STAINED_GLASS_PANE:1"
name: "&7"
lore: []
# Custom GUI items
custom: []
sound:
open:
enabled: true
type: "BLOCK_BARREL_OPEN:1: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
lang.yml
# -------------------------------------
# | NDailyRewards Messages Config |
# -------------------------------------
# You can change all messages in this file, but don't change the keys
# NDailyRewards supports HEX colors, and you can combine it with default Minecraft colors codes
prefix: "&6[&eNDailyRewards&6] &7"
no-permission: "&cYou don't have permission to do that!"
not-player: "&cYou must be a player to do that!"
player-not-found: "&cPlayer not found!"
invalid-syntax: "&cInvalid syntax! Use &f/reward help &cto see available commands"
commands:
help:
- "&6List of available commands:"
- "&f/reward &7- Opens rewards menu"
- "&f/reward claim &7- Claim latest reward without opening the menu"
- "&f/reward help &7- Show this message"
- "&f/reward reload &7- Reloads plugin"
- "&f/reward setday <player> <day> &7- Set player's day"
- "&f/reward version &7- Show plugin version"
reload: "&aPlugin reloaded!"
setday: "&aSet &e<player> &acurrent day to &e<day>"
events:
notify-when-available: "&6You have available rewards! Use &f/reward &6to open the menu"
claim:
already-claimed: "&cYou have already claimed this reward"
available-soon: "&cThis reward will be available soon"
not-available: "&cYou can't claim this reward yet"
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
Config modifications
You can use some new features in the config file, like HEX colors, custom model data, and more.
HEX Colors
In addition to the standard colors defined using the &
symbols, more detailed colors can be utilized through HEX coding. You can employ the following format within any text: <#ffffff> - representing the color white.
TIP
You can use this website to pick HEX colors.
Gradient
To apply a gradient effect, you can use this simple format:
<#00FF00>Text with gradient</#FFFF00>
TIP
You can use alternative method to create gradient text by using this website.
Custom Model Data
You can use custom model data in the GUI configuration. This feature allows you to use custom textures for items in the GUI. To use this feature, you need to change material
field.
gui:
reward:
title: "&6Daily Rewards"
size: 27
display:
available:
material: "CustomModel[<MATERIAL>:<QUANTITY>][INT]"
name: "&aDay <dayNum>"
lore:
- "&7Your Reward Awaits"
- "&7Click Me to claim your prize!"
- ""
- "<reward-lore>"
2
3
4
5
6
7
8
9
10
11
12
13
Custom player head textures
You can use custom head textures in the GUI configuration. This feature allows you to set custom head for items in the GUI. To use this feature, you need to change material
field. Plugin have some other types of custom player heads:
- URL - Link to head texture
- UUID - UUID of player
- BASE64 - Base64 texture string
gui:
reward:
title: "&6Daily Rewards"
size: 27
display:
available:
material: "CustomSkull[PLAYER_HEAD:1]{URL:https://textures.minecraft.net/texture/dba489a53d9465f33836355ad09c22d5d2593e61bfab45fc19062a751c4005a2}"
name: "&aDay <dayNum>"
lore:
- "&7Your Reward Awaits"
- "&7Click Me to claim your prize!"
- ""
- "<reward-lore>"
2
3
4
5
6
7
8
9
10
11
12
13
Custom GUI Buttons
You can use custom GUI buttons in the GUI configuration and add actions to it as in rewards. To use this feature, you need to change custom
field.
gui:
reward:
...
# Custom GUI items
custom:
example:
position: 26
material: "DIAMOND:1"
name: "&6Example"
lore:
- "&7This is an example button"
actions:
- "[message] &6You clicked the example button!"
- "[sound] ENTITY_EXPERIENCE_ORB_PICKUP:1:1"
2
3
4
5
6
7
8
9
10
11
12
13
14
15
In material field you can use all modifications that was written above.