Files
pythonmc/BookCraigRichardson/files/positionPage.py
BarsTigerMeowcat 8bed7171c2 Initial commit
2020-01-26 12:49:01 +02:00

12 lines
363 B
Python
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
from flask import Flask
app = Flask(__name__)
from mcpi.minecraft import Minecraft
mc = Minecraft.create()
pos = mc.player.getTilePos()
x, y, z = str(pos.x), str(pos.y), str(pos.z)
@app.route("/")
def showPosition():
return "Ваши координаты на момент запуска программы: " + "х-" + x + ", y-" + y + ", z-" + z
app.run()