mcpi - how to post commands to chat

167 views
Skip to first unread message

Srichakradhar Reddy Nagireddy

unread,
May 29, 2021, 8:35:43 AM5/29/21
to Adventures in Minecraft Forum
I have this simple script to summon an armor stand.

import mcpi.minecraft as minecraft
mc = minecraft.Minecraft.create()
cmd = '/summon armor_stand ~ ~2 ~1 {NoBasePlate:1,ShowArms:1,Invulnerable:1,CustomNameVisible:1b,Tags:["SocialBot"]}'
mc.postToChat(cmd)

but, it doesn't work when run.
Could anyone help me understand what's going wrong and help me with executing commands please?

Best,
Sri.
Reply all
Reply to author
Forward
0 new messages