minecraftTellrawGenerator
1.0.5
이것은 Python으로 작성된 스크립트에 대한 Minecraft Tellraw 명령을 생성하는 데 도움이 되는 간단한 Python 패키지입니다.
이 패키지는 Python 3에서만 테스트되었습니다.
pip install -U minecraftTellrawGenerator
모듈을 가져오고 가자!
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 ) + ']' )
[
{
"text" : " My super text " ,
"color" : " light_purple " ,
"bold" : true ,
"italic" : true ,
"insertion" : " /say hello " ,
"clickEvent" :{
"action" : " run_command " ,
"value" : " Hello all ! "
},
"hoverEvent" :{
"action" : " show_text " ,
"value" :{
"text" : " Hooooooooooover text " ,
"color" : " blue " ,
"bold" : true
}
}
},
{
"text" : " Another text " ,
"color" : " white " ,
"underlined" : true ,
"strikethrough" : true
},
{
"text" : " JUST FOR FUN " ,
"color" : " white " ,
"bold" : true ,
"obfuscated" : true
}
]
https://pypi.python.org/pypi/minecraftTellrawGenerator
발렌틴 드빌 [트위터]
라이센스: GPLV3