View on GitHub

python-minecraft

Introductions and Python Code examples for kids to learn python programming with minecraft. The Python code will run with a modified MCPI (Pi edition API Python Library) call `mcpi-e`, and a mincraft server call spigot with the RaspberryJuice plugin installed.

back to main

How to Enable Python API on Minecraft Server

1. What is Minecraft plugin and the RaspberryJuice Plugin

Plugins are mods used by modified Minecraft servers like Bukkit or Spigot. As you may knew the Minecraftcraft server is a Java application, the plugins for Minecraft servers are written by Java too.

Minecraft Java Editions have Pi API to support Respberry Pi. The RaspberryJuice Plugin(https://dev.bukkit.org/projects/raspberryjuice) is program with the Minecraft Pi API. The plugin listens to port 4711, and accepts most of the Minecraft Pi commands. For more details please visit https://wiki.vg/Minecraft_Pi_Protocol

The Spigot Minecraft server zip file you can find from my site already include the RaspberryJuice plugin. minecraft_spigot-1.15.2.zip

If you want to install it yourself, you could download from the from RaspberryJuice Plugin(https://dev.bukkit.org/projects/raspberryjuice), and put in the plugin folder RaspberryJuicePlugin

2. Python mcpi-e module

mcpi or mcpi-e is a Python Module could be used to comunicate with the RsaperberryJuice on the port 4711. So if you install the mcpi-e Python module, You can send your command to the Minecraft server. Please viewthe diagram below to understand how it works:

visit mcpi-e

HowPythonMincecraftWorks