forked from HelpChat/ChatChat
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMessagesHolder.java
More file actions
258 lines (201 loc) · 9 KB
/
MessagesHolder.java
File metadata and controls
258 lines (201 loc) · 9 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
package at.helpch.chatchat.config.holder;
import net.kyori.adventure.text.Component;
import org.jetbrains.annotations.NotNull;
import org.spongepowered.configurate.objectmapping.ConfigSerializable;
import static net.kyori.adventure.text.Component.text;
import static net.kyori.adventure.text.format.NamedTextColor.GREEN;
import static net.kyori.adventure.text.format.NamedTextColor.RED;
import static net.kyori.adventure.text.format.NamedTextColor.WHITE;
import static net.kyori.adventure.text.format.NamedTextColor.YELLOW;
// configurate requires non-final fields
@SuppressWarnings("FieldMayBeFinal")
@ConfigSerializable
public final class MessagesHolder {
// user related
private Component consoleOnly = text("Only the console can do this!", RED);
private Component playersOnly = text("Only players can do this!", RED);
private Component userOffline = text("The user is not online!", RED);
private Component userNotInTown = text("You are not in a town!", RED);
// messaging related
private Component noReplies = text("You have no one to reply to!", RED);
private Component repliesDisabled = text("You can't send private messages while they're disabled!", RED);
private Component targetRepliesDisabled = text("This user has their private messages disabled!", RED);
private Component privateMessagesEnabled = text("Your private messages have been enabled!", GREEN);
private Component privateMessagesDisabled = text("Your private messages have been disabled!", RED);
private Component cantMessageYourself = text("You can't message yourself!", RED);
private Component emptyMessage = text("You can't send an empty message!", RED);
private Component specialCharactersNoPermission = text("You do not have permission to use special characters!",
RED);
private Component invalidMessage = text("The message you sent is invalid!", RED);
private Component socialSpyEnabled = text("Social spy enabled", GREEN);
private Component socialSpyDisabled = text("Social spy disabled", RED);
private Component ignoredPlayer = text("Successfully ignored <player>.", GREEN);
private Component unignoredPlayer = text("Successfully un-ignored <player>.", GREEN);
private Component alreadyIgnored = text("You are already ignoring <player>.", RED);
private Component notIgnored = text("You are not ignoring <player>.", RED);
private Component notIgnoringAnyone = text("You are not ignoring anyone.", RED);
private Component ignoredPlayersList = text("You are ignoring following players:", YELLOW)
.append(text("<ignored_players>", WHITE))
.append(text(".", YELLOW));
private Component cantIgnoreYourself = text("You cannot ignore yourself!", RED);
private Component cantMessageIgnoredPlayer = text("You cannot message a player who you ignore.", RED);
private Component cantMessageGeneral = text("You cannot message this player.", RED);
private Component chatEnabledSuccessfully = text("Your chat has been enabled successfully!", GREEN);
private Component chatDisabledSuccessfully = text("Your chat has been disabled successfully!", RED);
private Component chatDisabled = text("Your chat is disabled! You can not send or receive messages until you enable it.", RED);
// channel related
private Component channelNoPermission = text("You do not have permission to use this channel", RED);
private Component channelNoPermissionSwitch = text("You no longer have permission to use this channel so it has been switched to the <default> channel. ", RED);
private Component channelSwitched = text("You have switched to the <channel> channel", GREEN);
private Component rangedChatEnabledSuccessfully = text("Your ranged chat has been enabled successfully!", GREEN);
private Component rangedChatDisabledSuccessfully = text("Your ranged chat has been disabled successfully!", RED);
// command related
private Component commandUnknownCommand = text("Unknown Command.", RED);
private Component commandInvalidUsage = text("Invalid usage.", RED);
private Component commandInvalidArgument = text("Invalid argument.", RED);
private Component commandNoPermission = text("No Permission.", RED);
// dump reloated
private Component dumpFailed = text("Failed to create dump!", RED);
private Component dumpSuccess = text("Dump created successfully! You can find it at: <url>", GREEN);
// mention related
private Component personalMentionsEnabled = text("Successfully enabled personal mentions!", GREEN);
private Component personalMentionsDisabled = text("Successfully disabled personal mentions!", GREEN);
private Component channelMentionsEnabled = text("Successfully enabled channel mentions!", GREEN);
private Component channelMentionsDisabled = text("Successfully disabled channel mentions!", GREEN);
// format related
private Component invalidFormat = text("Invalid format.", RED);
// generic
private Component genericError = text("An unexpected error occurred!", RED);
public @NotNull Component consoleOnly() {
return consoleOnly;
}
public @NotNull Component playersOnly() {
return playersOnly;
}
public @NotNull Component userOffline() {
return userOffline;
}
public @NotNull Component userNotInTown() {
return userNotInTown;
}
public @NotNull Component noReplies() {
return noReplies;
}
public @NotNull Component repliesDisabled() {
return repliesDisabled;
}
public @NotNull Component targetRepliesDisabled() {
return targetRepliesDisabled;
}
public @NotNull Component cantMessageYourself() {
return cantMessageYourself;
}
public @NotNull Component emptyMessage() {
return emptyMessage;
}
public @NotNull Component privateMessagesEnabled() {
return privateMessagesEnabled;
}
public @NotNull Component privateMessagesDisabled() {
return privateMessagesDisabled;
}
public @NotNull Component specialCharactersNoPermission() {
return specialCharactersNoPermission;
}
public @NotNull Component invalidMessage() {
return invalidMessage;
}
public @NotNull Component socialSpyEnabled() {
return socialSpyEnabled;
}
public @NotNull Component socialSpyDisabled() {
return socialSpyDisabled;
}
public @NotNull Component channelNoPermission() {
return channelNoPermission;
}
public @NotNull Component channelNoPermissionSwitch() {
return channelNoPermissionSwitch;
}
public @NotNull Component channelSwitched() {
return channelSwitched;
}
public @NotNull Component unknownCommand() {
return commandUnknownCommand;
}
public @NotNull Component invalidUsage() {
return commandInvalidUsage;
}
public @NotNull Component invalidArgument() {
return commandInvalidArgument;
}
public @NotNull Component noPermission() {
return commandNoPermission;
}
public @NotNull Component dumpFailed() {
return dumpFailed;
}
public @NotNull Component dumpSuccess() {
return dumpSuccess;
}
public @NotNull Component ignoredPlayer() {
return ignoredPlayer;
}
public @NotNull Component unignoredPlayer() {
return unignoredPlayer;
}
public @NotNull Component alreadyIgnored() {
return alreadyIgnored;
}
public @NotNull Component notIgnored() {
return notIgnored;
}
public @NotNull Component notIgnoringAnyone() {
return notIgnoringAnyone;
}
public @NotNull Component ignoredPlayersList() {
return ignoredPlayersList;
}
public @NotNull Component cantIgnoreYourself() {
return cantIgnoreYourself;
}
public @NotNull Component personalMentionsEnabled() {
return personalMentionsEnabled;
}
public @NotNull Component personalMentionsDisabled() {
return personalMentionsDisabled;
}
public @NotNull Component channelMentionsEnabled() {
return channelMentionsEnabled;
}
public @NotNull Component channelMentionsDisabled() {
return channelMentionsDisabled;
}
public @NotNull Component invalidFormat() {
return invalidFormat;
}
public @NotNull Component cantMessageIgnoredPlayer() {
return cantMessageIgnoredPlayer;
}
public @NotNull Component cantMessageGeneral() {
return cantMessageGeneral;
}
public @NotNull Component chatEnabledSuccessfully() {
return chatEnabledSuccessfully;
}
public @NotNull Component chatDisabledSuccessfully() {
return chatDisabledSuccessfully;
}
public @NotNull Component chatDisabled() {
return chatDisabled;
}
public @NotNull Component rangedChatEnabledSuccessfully() {
return rangedChatEnabledSuccessfully;
}
public @NotNull Component rangedChatDisabledSuccessfully() {
return rangedChatDisabledSuccessfully;
}
public @NotNull Component genericError() {
return genericError;
}
}