Kirsle.net logo Kirsle.net

Minecraft Server Wrapper

February 13, 2014 by Noah
This is something I've been wanting to program for a while, and I finally have.

It's a Python app that wraps the Minecraft server and makes the server console available over a separate TCP socket (with password authentication, of course).

This allows you to telnet in to this TCP port, provide the password (or a challenge-response hashed version of it), and then you get access to the Minecraft server console. Anything the server outputs is broadcasted to all authenticated clients, and anything the clients send is sent to the Minecraft server. But the real strength in this isn't necessarily just being able to see and type commands into the server console (you can do this at the local shell running the server normally); it's for programs to do this automatically!

For example, you can have a whitelist of users who aren't operators, but you want them to be able to say for example !creative in the server chat window, and have their game mode switched to creative. This is one of the example scripts I included in my project, actually!

01-gamemode.py

And as a more eccentric example, I connected a simple RiveScript bot to this so that it can chat with players using the in-game chat system:

02-rivescript.py

You can get the source code and play around with this yourself at minecraft-control on GitHub!

Tags:

Comments

There is 1 comment on this page. Add yours.

Avatar image
Schwartz posted on February 27, 2014 @ 17:29 UTC

I tried your script with a fantastic success.

I will continue to follow your work.

Thank a lot !

Add a Comment

Used for your Gravatar and optional thread subscription. Privacy policy.
You may format your message using GitHub Flavored Markdown syntax.