Overview

HTTPS SSH

pyMinecraft


This repo is meant to hold scripts used to interact with a Minecraft server running the RasberryJuice plugin. To do this we will use the Spigot minecraft server mod, along with RasberryJuice for Bukkit. Once the server is setup we will then be able to use python to make changes to game world via mcpi which is the python interface written by Mojang for the RasberryPi version of Minecraft.

Setup spigot_server

On OS X/Windows: Install Docker Toolbox.

On Linux: Install Docker Engine and Docker Compose.

Then cd into where you cloned this repo locally:

$ cd /path/to/pyminecraft

Copy server.properties.example as server.properties:

$ cp server/server.properties{.example,}

Edit server.properties if you want.

Then, simply run this command:

$ docker-compose build

Setup mcpi

Install mcpi as a python2 module so you can use it in scripts.

First cd into where you cloned this repo locally:

$ cd /path/to/pyminecraft

Then install setuptools if you haven't already:

$ pip install setuptools

Finally, install mcpi:

$ python setup.py install

Configuration

On OS X, you will need to create a ~/.pyminecraft folder and ~/.pyminecraft/config like the following:

[Server]
address = 192.168.99.100
port = 4711

The address attribute should be filled to match the output of the docker-machine ip command:

$ docker-machine ip default
192.168.99.100

Usage

To bring up the spigot_server:

$ cd /path/to/pyminecraft
$ docker-compose up spigot_server

On OS X/Windows, in the Minecraft client, the Server address will be the output of:

$ docker-machine ip default