Skip to content

Instantly share code, notes, and snippets.

@benjjo
Forked from PieCoder314/mcpichat.py
Last active November 23, 2016 18:56
Show Gist options
  • Save benjjo/0b4bf99f617b5985f57695492f21abf8 to your computer and use it in GitHub Desktop.
Save benjjo/0b4bf99f617b5985f57695492f21abf8 to your computer and use it in GitHub Desktop.
A script for Minecraft Pi Edition that adds a chat box.
#/usr/bin/python3.4
#----------Minecraft Pi Chat---------#
#-----------By PieCoder314-----------#
#---Bringing chat to minecraft pi!---#
# Credit to: PieCoder314/mcpichat.py #
from mcpi import minecraft
mc = minecraft.Minecraft.create()
mc.postToChat("Go to python shell to chat.")
name = input("What is your username?")
mc.postToChat(name, " joined the game")
while TRUE:
chat = input("Message: ")
mc.postToChat("<" + name + "> " + chat)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment