/
config.yml
executable file
·375 lines (375 loc) · 15 KB
/
config.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
# Example of everything at once.
module_data:
discord:
bot-name: "TOKEN"
sql:
all: "jdbc:mysql://localhost:3306/?user=USERNAME&password=PASSWORD"
redis:
redis: "redis://password@host:port"
redis_ssl: "rediss://password@host:port" # https://redis.io/topics/encryption
mqtt:
# https://mosquitto.org/documentation/dynamic-security/ https://www.hivemq.com/mqtt-security-fundamentals/
mqtt: tcp://localhost:1883
mqtt_ssl: ssl://localhost:1883
chains:
- common-demo: # This module is always loaded
- break # This stops the chain, but returns the value
- halt # Exits at that current point, do not continue afterwards (this used to be called stop)
- echo: "echo'd %CURRENT%" # This sets the string to the specifiedFormat. The Previous value is set to the CURRENT context
- reload # Reloads ChatDirector
- bukkit-demo:
- bukkit-input: # All of these are optional
chat: true
logout: true
login: true
server-started: true
server-stopped: true
check-canceled: true
override-chat: true # This will set the message to the result of the chain
new-join: true
cancel-chat: true
format-chat: "%PLAYER_NAME%: %CHAT_MESSAGE%"
format-login: "**%PLAYER_NAME% joined the server**"
format-new-player: "**Welcome %PLAYER_NAME%!**"
format-logout: "**%PLAYER_NAME% joined the server**"
format-stopped: "**Server Stopped**"
format-started: "**Server Started**"
- bukkit-playerlist:
format: "```\nOnline players (%NUM_PLAYERS%/%MAX_PLAYERS%):\n" # Optional
format-player: "%PLAYER_NAME%" # Optional
format-no-players: "**No online players**" # Optional
- bukkit-output:
permission: null # Optional
- bukkit-command: # Registers a new command with permission
command: "example-command"
permission: "example-permission"
- bukkit-context: null
- bukkit-execute:
command: "say hello there!" # STATIC command to run. No contexts resolved here for security reasons.
sender: "%PLAYER_UUID%" # Optional UUID of player to execute as. If omitted, defaults to console.
- bungee-demo:
- bungee-to:
channel: "custom-channel"
- bungee-from:
channel: "custom-channel"
- bungee-playerlist:
format: "```\nOnline players (%NUM_PLAYERS%/%MAX_PLAYERS%):\n" # Optional
format-player: "%PLAYER_NAME%" # Optional
format-server: "%SERVER_NAME%" # Optional
format-no-players: "**No online players**" # Optional
split-by-server: false # Optional
- bungee-command:
command: "example-command"
permission: "example-permission"
- bungee-output: null
- bukkit-output-fancy:
permission: null
player: "player name or player UUID" # This takes prescience over permission, and does NOT check permission when sending to a player
send-to-current-server: true # This checks against SERVER_NAME with a player's connected server.
fancy-message: # Can have any number of fancy formats
- click:
click-run-command: "/test"
click-suggest-command: "/suggestion"
click-url: "https://sftmc.org"
text: "text to show" # This can also be a list of fancy formats
- color:
color: "RED"
bold: false
italics: true
strikethrough: true
obfuscated: false
text: "TEST" # This can also be a list of fancy formats
- hover:
show-text: "text"
text: "TEST" # This can also be a list of fancy formats
- raw:
text: "TEST"
- bungee-output-server:
server: "SERVER NAME"
permission: null # optional
- bungee-output-player:
player: "%PLAYER_NAME%" # can be a UUID too
permission: null # optional
- bungee-input: # All Optional
chat: true
logout: true
switch-servers: true
login: true
override-chat: true # This will set the message to the result of the chain WARNING THIS MAY SLOW DOWN SERVER
command: false
format-chat: "[%SERVER_NAME%] %PLAYER_NAME%: %CHAT_MESSAGE%"
format-logout: "&0[&4<-&0] &e%PLAYER_NAME% has left the network from %PLAYER_SERVER_NAME%, Have a good day!"
format-switch-servers: "&0[&e<->&0] &e%PLAYER_NAME% has switched to %PLAYER_SERVER_NAME%"
format-join: "&0[&2->&0] &e%PLAYER_NAME% joined the network on %PLAYER_SERVER_NAME%!"
- cache-demo:
- cache-get:
key: "SomeUnqiueKey" # Where get the value from
- cache-set:
key: ""
value: ""
- cache-if:
yes-chain: # List of items to run if there is a cached value
- stop: null
no-chain: null # List of items to run if there is no cached value
key: "KEY" # The key to check for
- context-demo:
- get-context:
key: "SERVER_%SERVER_NAME%_Players" # Normally such a nested contexts would not be possible
- set-context:
key: "TARGET_CONTEXT"
value: "Hello %PLAYER_NAME% you have %BALANCE% money!" # Optional. defaults to CURRENT
- remove-context:
key: "SERVER_NAME"
- console-demo:
- console-output: null
- console-output-error: null
- discord-demo:
- discord-add-role:
bot: bot-name
role: ROLE_ID
user: USER_ID
server: SERVER_ID
- discord-input:
channel: "0" # CHANNEL_ID
bot: bot-name
category: "CATEGORY_ID" # optional
message: "MESSAGE_ID" # optional
reaction-add-event: true # optional
reaction-remove-event: false # optional
message-event: true # optional
- discord-resolve:
server: "0" # SERVER_ID
bot: bot-name
to-discord: false
to-plain: true
- discord-output: # Sends string with NO CONTEXT RESOLVING.
channel: "0" # CHANNEL_ID
format: "[%DISCORD_ROLE%]%DISCORD_AUTHOR_NICK_NAME%: %DISCORD_MESSAGE%" # Optional
bot: bot-name
- discord-output-reaction:
channel: "0" # CHANNEL_ID
bot: bot-name
message: "MESSAGE ID"
emoji: "either a custom emoji id or unicode"
add: true # true to add an emoji, false to remove one
- discord-get-dm-channel: # Puts the ID into DISCORD_DM_CHANNEL_ID
bot: "bot-name"
user: "USER ID"
- discord-output-file:
channel: "0" # CHANNEL_ID
name: "hello world" # Optional
bot: bot-name
- discord-create-channel:
server: "0" # SERVER_ID
bot: bot-name
name: "channel" # Optional
category: "%CATEGORY_ID%" # Optional
user: "%DISCORD_AUTHOR ID%" # Optional
topic: "hello world" # Optional
- discord-message-history:
bot: "bot name"
channel: "channel id"
length: 50 # Optional how many messages of history ot get
format: "%DISCORD_MESSAGE%" # Optional
- discord-embed: # https://javacord.org/wiki/basic-tutorials/embeds.html#embed-limits
bot: "bot name"
channel: "channel name"
author-avatar: "Author Avatar" # Optional
author-link: "Author Link" # Optional
author-name: "Author Name" # Optional
color: "BLUE" # Optional
description: "Description" # Optional
footer-avatar: "Footer Avatar" # Optional
footer-name: "Footer Name" # Optional
fields: # Optional
"field 1 header": "field 1 body"
"field 2 header": "field 2 body"
inline-fields: # Optional
"inline field 1 header": "inline field 1 body"
"inline field 2 header": "inline field 2 body"
image: "Image" # Optional
thumbnail: "Thumbnail" # Optional
title: "Title" # Optional
- discord-delete-channel:
bot: "bot name"
channel: "channel id"
- discord-delete-channel:
bot: "bot name"
channel: "channel id"
message: "channel id"
- discord-rename-channel:
bot: "bot name"
channel: "channel id"
name: "channel name"
- discord-participants:
bot: "bot name"
length: 50 # Optional how many messages of history ot get
channel: "channel id"
each: null # List of Items
- file-demo:
- file-input:
path: PATH_TO_FIFO
delay: 500 # optional, defaults to 500
create: false # optional defaults to false
- file-output:
path: PATH_TO_FIFO
delay: 500 # optional, defaults to 500
create: false # optional defaults to false
- logic-demo:
- if-contains:
yes-chain: # this can be any list of items or optional
- pass: null
- stop: null
no-chain: null # Or this can be nothing or optional
contains: "String"
source: "%CURRENT%" # Optional. source.contains(contains)
- if-equals:
yes-chain: null # Optional
no-chain: null # Optional
equals: "String"
source: "%CURRENT%" # Optional. source.equals(contains)
ignore-case: false # optional
- if-regex-match:
yes-chain: null # Optional
no-chain: null # Optional
match: "[sS]tring"
source: "%CURRENT%" # Optional. source.match(contains)
- split:
- stream-1:
- echo: "hello!"
- break: null
- stream-2:
- halt: null
- if-starts-with:
yes-chain: null # Optional
no-chain: null # Optional
starts: "String"
source: "%CURRENT%" # Optional. source.startsWith(contains)
- if-ends-with:
yes-chain: null # Optional
no-chain: null # Optional
ends: "String"
source: "%CURRENT%" # Optional. source.endsWith(contains)
- luckperms-demo:
- luckperms-context: null # This loads the PREFIX, SUFFIX and GROUP of the player in the PLAYER_NAME context.
- luckperms-has: # This is checked against the player in PLAYER_UUID
yes-chain: null # Chain of items
no-chain: null # Chain of items
permission: "permission.node" # Just normal nodes, no regex, no contexts.
- luckperms-set: # This is applied to the player in PLAYER_UUID. No regex allowed here.
permission: "permission.node" # Just normal nodes, no regex, no contexts.
value: false # Set the node to true or false (non-functional?)
- luckperms-unset: # This is applied to the player in PLAYER_UUID
permission: "permission.node" # Just normal nodes, no regex, no contexts.
value: false # Set the node to true or false ( (non-functional?)
- multichat-demo:
- multichat-context: null # Adds more contexts
- multichat-input:
global: true
staff: true
broadcast: true
- mqtt:
- mqtt-output:
connection: "mqtt"
async: false
topic: "example topic"
- mqtt-input:
connection: "mqtt"
topic: "example topic"
- placeholderapi-resolve: null
- redis:
- redis-get:
connection: "redis"
key: "example key"
- redis-set:
connection: "redis"
key: "example key"
value: "example value"
- redis-remove:
connection: "redis"
key: "example key"
- redis-if:
connection: "redis"
key: "example key"
yes-chain:
- echo: "yes"
no-chain:
-echo: "no"
- random-demo:
- random:
min: 1 # smallest number
max: 10 # largest number
- replacement-demo:
- regex:
- "Regex to find": "regex to replace"
- "Regex to find": "regex to replace"
- remove-colors: null
- resolve-colors: null # converts & into §
- to-upper: null # to upper case
- to-lower: null # to lower case
- to-word: null # Capitalize each word
- sub-string:
start: 2 # number of characters to end at (optional)
end: 4 # number of characters to end at (optional)
- schedule-demo:
- schedule-input:
delay: 100 # Delay in Milliseconds
period: 100 # Milliseconds to repeat (optional)
- schedule-cron-input:
cron: "" # Cron formatted string starting with seconds
- sponge-demo:
- sponge-command:
command: "command"
permission: "*"
args: true # Optional
- sponge-input: # All of these are optional
chat: true
logout: true
login: true
server-started: true
server-stopped: true
override-chat: true # This will set the message to the result of the chain WARNING THIS MAY SLOW DOWN SERVER
check-canceled: true
cancel-chat: true
format-chat: "%PLAYER_NAME%: %CHAT_MESSAGE%"
format-started: "**Server Started**"
format-stopped: "**Server Stopped**"
format-login: "**%PLAYER_NAME% joined the server**"
format-logout: "**%PLAYER_NAME% left the server**"
- sponge-playerlist:
format: "```\nOnline players (%NUM_PLAYERS%/%MAX_PLAYERS%):\n" # Optional
format-player: "%PLAYER_NAME%" # Optional
format-no-players: "**No online players**" # Optional
- sponge-output:
permission: "permission" # Optional
- sql-demo:
# The Table looks like this
# name key value
- send-data:
connection: "all" # Connection name
table: "" # Table name
name: "" # First key
key: "" # Second key
value: "" # This is set
cache: true
- retrieve-data:
connection: "all" # Connection name
table: ""
name: ""
key: ""
cache: true
- sql-cache-remove:
connection: "all" # Connection name
table: ""
name: ""
key: ""
- sql-cache-if:
connection: "all" # Connection name
table: "" # Table name
name: "" # First key
key: "" # Second key
yes-chain: # List of items to run if there is a cached value
- stop: null
no-chain: null # List of items to run if there is no cached value
- vault-demo:
- vault-context: null # This loads the PREFIX, SUFFIX, BALANCE and GROUP of the player in the PLAYER_NAME context.