-
Notifications
You must be signed in to change notification settings - Fork 1
/
example.py
40 lines (30 loc) · 947 Bytes
/
example.py
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
from minecraftTellrawGenerator import MinecraftTellRawGenerator as mctellraw
hover = mctellraw(text='Hooooooooooover text', bold=True, color='blue')
a = mctellraw(
text='My super text',
color='light_purple',
italic=True,
bold=True,
insertion='/say hello',
click='Hello all !',
hover=hover
)
b = mctellraw(
text="Another text",
underlined=True,
strikethrough=True
)
c = mctellraw(text="JUST FOR FUN", obfuscated=True, bold=True)
d = mctellraw(text="Click here to open my github page",
color='yellow',
url='https://github.com/MyTheValentinus',
hover=mctellraw(text='Click !', bold=True, color='dark_red')
)
# Get output:
print(a)
# Or in certain case you need to cast
print(str(a))
# Get all messages in one:
print(mctellraw.multiple_tellraw(a, b, c, d))
# OR old / classic method
print('[' + str(a) + ', ' + str(b) + ', ' + str(c) + ']')