-
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMessageConfig.java
More file actions
291 lines (271 loc) · 16.2 KB
/
MessageConfig.java
File metadata and controls
291 lines (271 loc) · 16.2 KB
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
package com.eternalcode.parcellockers.configuration.implementation;
import com.eternalcode.multification.notice.Notice;
import eu.okaeri.configs.OkaeriConfig;
import eu.okaeri.configs.annotation.Comment;
import eu.okaeri.configs.annotation.Header;
import io.papermc.paper.registry.keys.SoundEventKeys;
@Header({
"# This file contains messages used by the ParcelLockers plugin.",
"# You can customize these messages to fit your server's theme or language.",
"# You may use legacy color codes with '&' (e.g., &a for green, &c for red)",
"# MiniMessage formatting is also supported for advanced text styling."
})
public class MessageConfig extends OkaeriConfig {
@Comment({"", "# Messages related to general commands can be configured here." })
public Notice playerOnlyCommand = Notice.chat("&4✘ &cThis command is only available to players!");
public Notice noPermission = Notice.chat("&4✘ &cYou don't have permission to perform this command! &6(&c{PERMISSION}&6)");
public Notice playerNotFound = Notice.chat("&4✘ &cThe specified player could not be found!");
public Notice invalidUsage = Notice.builder()
.chat("&4» &cCorrect usage: &6{USAGE}")
.sound(SoundEventKeys.BLOCK_NOTE_BLOCK_PLING)
.build();
public Notice reload = Notice.chat("&3❣ &bConfiguration has been successfully reloaded!");
@Comment({"", "# Messages related to parcels can be configured here." })
@Comment("# These messages are used when sending, collecting, or managing parcels.")
public ParcelMessages parcel = new ParcelMessages();
@Comment({"", "# Messages related to parcel lockers can be configured here." })
@Comment("# These messages are used when creating, deleting, or managing parcel lockers.")
public LockerMessages locker = new LockerMessages();
@Comment({"", "# Messages related to admin commands can be configured here." })
@Comment("# These messages are used for administrative actions such as deleting all lockers or parcels.")
public AdminMessages admin = new AdminMessages();
@Comment({"", "# Messages related to Discord integration can be configured here." })
@Comment("# These messages are used for linking Discord accounts with Minecraft accounts.")
public DiscordMessages discord = new DiscordMessages();
public static class ParcelMessages extends OkaeriConfig {
public Notice sent = Notice.builder()
.chat("&2✔ &aParcel sent successfully.")
.sound(SoundEventKeys.ENTITY_ITEM_PICKUP)
.build();
public Notice cannotSend = Notice.builder()
.chat("&4✘ &cAn error occurred while sending the parcel. Check the console for more information.")
.sound(SoundEventKeys.ENTITY_VILLAGER_NO)
.build();
public Notice nameCannotBeEmpty = Notice.builder()
.chat("&4✘ &cThe parcel name cannot be empty!")
.sound(SoundEventKeys.ENTITY_VILLAGER_NO)
.build();
public Notice nameSet = Notice.builder()
.chat("&2✔ &aParcel name set successfully.")
.sound(SoundEventKeys.ENTITY_EXPERIENCE_ORB_PICKUP)
.build();
public Notice cannotBeEmpty = Notice.builder()
.chat("&4✘ &cThe parcel cannot be empty!")
.sound(SoundEventKeys.ENTITY_ENDERMAN_AMBIENT)
.build();
public Notice receiverSet = Notice.builder()
.chat("&2✔ &aParcel receiver set successfully.")
.sound(SoundEventKeys.ENTITY_EXPERIENCE_ORB_PICKUP)
.build();
public Notice descriptionSet = Notice.builder()
.chat("&2✔ &aParcel description set successfully.")
.sound(SoundEventKeys.ENTITY_EXPERIENCE_ORB_PICKUP)
.build();
public Notice destinationSet = Notice.builder()
.chat("&2✔ &aParcel destination locker set successfully.")
.sound(SoundEventKeys.ENTITY_EXPERIENCE_ORB_PICKUP)
.build();
public Notice cannotCollect = Notice.builder()
.chat("&4✘ &cAn error occurred while collecting the parcel.")
.sound(SoundEventKeys.ENTITY_VILLAGER_NO)
.build();
public Notice databaseError = Notice.builder()
.chat("&4✘ &cA database error occurred. Please contact an administrator.")
.sound(SoundEventKeys.ENTITY_ITEM_BREAK)
.build();
public Notice noInventorySpace = Notice.builder()
.chat("&4✘ &cYou don't have enough space in your inventory to collect the parcel!")
.sound(SoundEventKeys.ENTITY_VILLAGER_NO)
.build();
public Notice collected = Notice.builder()
.chat("&2✔ &aParcel collected successfully.")
.sound(SoundEventKeys.ENTITY_PLAYER_LEVELUP)
.build();
public Notice nameNotSet = Notice.builder()
.chat("&4✘ &cThe parcel name is not set!")
.sound(SoundEventKeys.ENTITY_ENDERMAN_AMBIENT)
.build();
public Notice receiverNotSet = Notice.builder()
.chat("&4✘ &cThe parcel receiver is not set!")
.sound(SoundEventKeys.ENTITY_ENDERMAN_AMBIENT)
.build();
public Notice destinationNotSet = Notice.builder()
.chat("&4✘ &cThe parcel destination locker is not set!")
.sound(SoundEventKeys.ENTITY_ENDERMAN_AMBIENT)
.build();
public Notice lockerFull = Notice.builder()
.chat("&4✘ &cThe destination locker is full! Please select another locker.")
.sound(SoundEventKeys.ENTITY_VILLAGER_NO)
.build();
public Notice illegalItem = Notice.builder()
.chat("&4✘ &cThe parcel contains illegal items that cannot be sent. ({ITEMS})")
.build();
public Notice cannotDelete = Notice.builder()
.chat("&4✘ &cAn error occurred while deleting the parcel.")
.sound(SoundEventKeys.ENTITY_VILLAGER_NO)
.build();
public Notice deleted = Notice.builder()
.chat("&2✔ &aParcel deleted successfully.")
.sound(SoundEventKeys.ENTITY_ITEM_BREAK)
.build();
public Notice insufficientFunds = Notice.builder()
.chat("&4✘ &cYou do not have enough funds to send this parcel! Required: &6${AMOUNT}&c.")
.sound(SoundEventKeys.ENTITY_VILLAGER_NO)
.build();
public Notice feeWithdrawn = Notice.builder()
.chat("&2✔ &a${AMOUNT} has been withdrawn from your account to cover the parcel sending fee.")
.sound(SoundEventKeys.ENTITY_EXPERIENCE_ORB_PICKUP)
.build();
@Comment({"", "# The parcel info message." })
public Notice parcelInfoMessages = Notice.builder()
.chat(
"&7» &6Parcel info:",
"&f• &6UUID: &e{UUID}",
"&f• &6Sender: &e{SENDER}",
"&f• &6Receiver: &e{RECEIVER}",
"&f• &6Size: &e{SIZE}",
"&f• &6Position: &6X: &e{POSITION_X}, &6Y: &e{POSITION_Y}, &6Z: &e{POSITION_Z}",
"&f• &6Priority: &e{PRIORITY}",
"&f• &6Description: &e{DESCRIPTION}"
)
.sound(SoundEventKeys.BLOCK_NOTE_BLOCK_CHIME)
.build();
}
public static class LockerMessages extends OkaeriConfig {
public Notice cannotCreate = Notice.builder()
.chat("&4✘ &cCould not create the parcel locker.")
.sound(SoundEventKeys.ENTITY_VILLAGER_NO)
.build();
public Notice created = Notice.builder()
.chat("&2✔ &aParcel locker created successfully.")
.sound(SoundEventKeys.BLOCK_ANVIL_USE)
.build();
public String descriptionPrompt = "&6Enter a name for the parcel locker:";
public Notice cannotBreak = Notice.builder()
.chat("&4✘ &cYou have no permission to break the parcel locker.")
.sound(SoundEventKeys.ENTITY_VILLAGER_NO)
.build();
public Notice deleted = Notice.builder()
.chat("&2✔ &aParcel locker deleted successfully.")
.sound(SoundEventKeys.BLOCK_ANVIL_BREAK)
.build();
public Notice broadcastRemoved = Notice.chat("&4❣ &cThe parcel locker at &4{X} {Y} {Z} &cin &4{WORLD} &chas been removed by &4{PLAYER}!");
public Notice alreadyCreating = Notice.builder()
.chat("&4✘ &cYou are already creating a parcel locker!")
.sound(SoundEventKeys.ENTITY_VILLAGER_NO)
.build();
public Notice alreadyExists = Notice.builder()
.chat("&4✘ &cA parcel locker already exists at this location!")
.sound(SoundEventKeys.ENTITY_VILLAGER_NO)
.build();
public Notice addedToInventory = Notice.builder()
.chat("&2✔ &aParcel locker item added to your inventory.")
.sound(SoundEventKeys.ENTITY_ITEM_PICKUP)
.build();
}
public static class AdminMessages extends OkaeriConfig {
public Notice deletedLockers = Notice.chat("&4⚠ &cAll ({COUNT}) parcel lockers have been deleted!");
public Notice deletedParcels = Notice.chat("&4⚠ &cAll ({COUNT}) parcels have been deleted!");
public Notice deletedItemStorages = Notice.chat("&4⚠ &cAll ({COUNT}) item storages have been deleted!");
public Notice deletedContents = Notice.chat("&4⚠ &cAll ({COUNT}) parcel contents have been deleted!");
public Notice deletedDeliveries = Notice.chat("&4⚠ &cAll ({COUNT}) deliveries have been deleted!");
}
public static class DiscordMessages extends OkaeriConfig {
public Notice verificationAlreadyPending = Notice.builder()
.chat("&4✘ &cYou already have a pending verification. Please complete it or wait for it to expire.")
.sound(SoundEventKeys.ENTITY_VILLAGER_NO)
.build();
public Notice alreadyLinked = Notice.builder()
.chat("&4✘ &cYour Minecraft account is already linked to a Discord account!")
.sound(SoundEventKeys.ENTITY_VILLAGER_NO)
.build();
public Notice discordAlreadyLinked = Notice.builder()
.chat("&4✘ &cThis Discord account is already linked to another Minecraft account!")
.sound(SoundEventKeys.ENTITY_VILLAGER_NO)
.build();
public Notice userNotFound = Notice.builder()
.chat("&4✘ &cCould not find a Discord user with that ID!")
.sound(SoundEventKeys.ENTITY_VILLAGER_NO)
.build();
public Notice verificationCodeSent = Notice.builder()
.chat("&2✔ &aA verification code has been sent to your Discord DM. Please check your messages.")
.sound(SoundEventKeys.ENTITY_EXPERIENCE_ORB_PICKUP)
.build();
public Notice cannotSendDm = Notice.builder()
.chat("&4✘ &cCould not send a DM to your Discord account. Please make sure your DMs are open.")
.sound(SoundEventKeys.ENTITY_VILLAGER_NO)
.build();
public Notice verificationExpired = Notice.builder()
.chat("&4✘ &cYour verification code has expired. Please run the command again.")
.sound(SoundEventKeys.ENTITY_VILLAGER_NO)
.build();
public Notice invalidCode = Notice.builder()
.chat("&4✘ &cInvalid verification code. Please run the command again to restart the verification process.")
.sound(SoundEventKeys.ENTITY_VILLAGER_NO)
.build();
public Notice linkSuccess = Notice.builder()
.chat("&2✔ &aYour Discord account has been successfully linked!")
.sound(SoundEventKeys.ENTITY_PLAYER_LEVELUP)
.build();
public Notice linkFailed = Notice.builder()
.chat("&4✘ &cFailed to link your Discord account. Please try again later.")
.sound(SoundEventKeys.ENTITY_VILLAGER_NO)
.build();
public Notice verificationCancelled = Notice.builder()
.chat("&6⚠ &eVerification cancelled.")
.sound(SoundEventKeys.BLOCK_NOTE_BLOCK_BASS)
.build();
public Notice playerAlreadyLinked = Notice.chat("&4✘ &cThis player already has a linked Discord account!");
public Notice adminLinkSuccess = Notice.chat("&2✔ &aSuccessfully linked the Discord account to the player.");
@Comment({"", "# Unlink messages" })
public Notice notLinked = Notice.builder()
.chat("&4✘ &cYour Minecraft account is not linked to any Discord account!")
.sound(SoundEventKeys.ENTITY_VILLAGER_NO)
.build();
public Notice unlinkSuccess = Notice.builder()
.chat("&2✔ &aYour Discord account has been successfully unlinked!")
.sound(SoundEventKeys.ENTITY_EXPERIENCE_ORB_PICKUP)
.build();
public Notice unlinkFailed = Notice.builder()
.chat("&4✘ &cFailed to unlink the Discord account. Please try again later.")
.sound(SoundEventKeys.ENTITY_VILLAGER_NO)
.build();
public Notice playerNotLinked = Notice.chat("&4✘ &cThis player does not have a linked Discord account!");
public Notice adminUnlinkSuccess = Notice.chat("&2✔ &aSuccessfully unlinked the Discord account from the player.");
public Notice discordNotLinked = Notice.chat("&4✘ &cNo Minecraft account is linked to this Discord ID!");
public Notice adminUnlinkByDiscordSuccess = Notice.chat("&2✔ &aSuccessfully unlinked the Minecraft account from the Discord ID.");
public Notice invalidDiscordId = Notice.chat("&4✘ &cInvalid Discord ID format! Please provide a valid Discord ID.");
@Comment({"", "# Dialog configuration for verification" })
public String verificationDialogTitle = "&6Enter your Discord verification code:";
public String verificationDialogPlaceholder = "&7Enter 4-digit code";
@Comment({"", "# Dialog button configuration" })
public String verificationButtonVerifyText = "<dark_green>Verify";
public String verificationButtonVerifyDescription = "<green>Click to verify your Discord account";
public String verificationButtonCancelText = "<dark_red>Cancel";
public String verificationButtonCancelDescription = "<red>Click to cancel verification";
@Comment({"", "# The message sent to the Discord user via DM" })
@Comment("# Placeholders: {CODE} - the verification code, {PLAYER} - the Minecraft player name")
public String discordDmVerificationMessage = "**📦 ParcelLockers Verification**\n\nPlayer **{PLAYER}** is trying to link their Minecraft account to your Discord account.\n\nYour verification code is: **{CODE}**\n\nThis code will expire in 2 minutes.";
@Comment({"", "# The message sent to the Discord user when a parcel is delivered" })
@Comment("# Placeholders: {PARCEL_NAME}, {SENDER}, {RECEIVER}, {DESCRIPTION}, {SIZE}, {PRIORITY}")
public String parcelDeliveryNotification = "**📦 Parcel Delivered!**\n\nYour parcel **{PARCEL_NAME}** has been delivered!\n\n**From:** {SENDER}\n**Size:** {SIZE}\n**Priority:** {PRIORITY}\n**Description:** {DESCRIPTION}";
public String highPriorityPlaceholder = "🔴 High Priority";
public String normalPriorityPlaceholder = "⚪ Normal Priority";
@Comment({"", "# DiscordSRV integration messages" })
@Comment("# These messages are shown when DiscordSRV is installed and handles account linking")
public Notice discordSrvLinkRedirect = Notice.builder()
.chat("&6⚠ &eTo link your Discord account, use the DiscordSRV linking system.")
.chat("&6⚠ &eYour linking code is: &a{CODE}")
.chat("&6⚠ &eSend this code to the Discord bot in a private message.")
.sound(SoundEventKeys.BLOCK_NOTE_BLOCK_CHIME)
.build();
public Notice discordSrvAlreadyLinked = Notice.builder()
.chat("&2✔ &aYour account is already linked via DiscordSRV!")
.sound(SoundEventKeys.ENTITY_VILLAGER_YES)
.build();
public Notice discordSrvUnlinkRedirect = Notice.builder()
.chat("&6⚠ &eTo unlink your Discord account, please use the DiscordSRV unlinking system.")
.sound(SoundEventKeys.BLOCK_NOTE_BLOCK_CHIME)
.build();
}
}