Skip to content
A Ruby API for the Raspberry Pi version of minecraft
Ruby
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
lib
spec
.gitignore
History.md
README.md
banner.png
minecraft_api.gemspec

README.md

Minecraft API for the Raspberry Pi

A Ruby API for the Raspberry Pi version of minecraft

Setup

Prerequisites :

Install the gem using the classic command :

gem install minecraft_api

Then, setup your code by importing the minecraft_api gem and connecting to your game.

require 'minecraft_api'

# hostname should be the ip or hostname of your server.
# port defaults to 4711, but you can override it.
api = MinecraftApi.new(hostname)

Playing around

# Set a block somewhere
api.world.block(5,10,15,Block::WOOD)

# Teleport the player away
api.player.go(20,40,60)

# Place a colored wool
my_wool = Wool.new(Color.PURPLE)
api.world.block(1,5,10,my_wool)
You can’t perform that action at this time.