Introduction: Tweeting Minecraft AI

Hi all, today I'm going to be showing you how to make your minecraft server think and talk, as well as announce it's thoughts to the world via twitter. you will need the following:
* A minecraft server
* A web browser
* A twitter account
that's all, so once you have that, you can get to work.

Step 1: Preparing Your Server

The first thing to do is to ensure your server is ready for the immense brainpower of it's new AI, but this is quite simple really. just go to www.bukkit.org and download the latest version of craftbukkit using the link on the right hand side. copy the download link from the resulting page, and save the file into the same folder as your minecraft_server.jar

if you are using a server hosting provider such as multiplay, then just ask them to install bukkit for you, as this will be a lot easier than getting access to one of their servers.

Step 2: Configuring Bukkit.

this is a relatively easy step, which can be skipped if you are using server hosting. simply start up your server by running the craftbukkit.jar file. this is the new way of starting up your server, so you shouldn't run the minecraft_server.jar file any more, but you do still need it, so don't delete it.

once you have started your server, type stop into the window, and press enter. this stops the server so it doesn't interfere with us editing the configurations.

Step 3: Install ServerEvents

before installing ServerEvents, a twitter connector library is required. this is available at 
https://cr-wd.com/minecraft/plugins/ServerEvents/twitter4j-core.jar
and should be saved into both the same folder as your minecraft_server.jar and a subfolder (which you may need to create) called lib.

once you have this file, you can download the main ServerEvents jar. this is avalable at
http://wimbli.com/minecraft/ServerEvents/ServerEvents_1.3.7.zip
save this into the folder called 'plugins' and unzip it there.

Step 4: Configure ServerEvents

ServerEvents automaticly creates it's config files when you run it the first time, so start and stop your server again like you did in step 2.
once you have done this, you should see a subfolder called ServerEvents inside the plugins folder. open this folder. inside here is a single file called server_events.xml that holds the configuration for ServerEvents. open this up so we can edit it.

inside this file there are several options for configuring ServerEvents, but it's luck because these are all commented, so you know what they do. I tend to leave them all alone, but the one we do want to change is the twitter accesstoken. to obtain an access token, go into the plugins folder and run the serverevents.jar on it's own. this will give you a web address to visit, and will then give you a PIN code to type in. once you type in this code, you will recieve your access token and secret.

Step 5: Have Fun.

start up your server again, and log in. you should be greeted with a happy message from your server. on the other hand it could just start groaning. either way, it's fun.

To stop spamming your twitter account, ServerEvents will only post a message every half hour when players are online. if nobody is online, then you won't get any snide remarks. have fun, and remember that I am not responsible for anyone that has been offended by your server.

Comments

author
shmikles (author)2011-11-11

Very good tutorials, thanks. Is there any way to disable the timestamp on Twitter messages? Exactly like the example image.

author
CyberJacob (author)shmikles2011-11-11

could you show me this 'timestamp'?
I've never seen it, so it might be another plugin putting it there

author
shmikles (author)CyberJacob2011-11-11

There it is, the time and then my timezone(South African Standard Time).

author
shmikles (author)shmikles2011-11-11

here

Screen Shot 2011-11-11 at 4.10.56 PM.png
author
CyberJacob (author)shmikles2011-11-11

strange, this isn't happening on my server.
what other plugins do you have installed?

author
shmikles (author)CyberJacob2011-11-11

Currently only serverevents.

In the XML config file, before the end of the twitter section, there is this: "timestamp_hour_offset="0" />". Could that have anything to do with it?

author
CyberJacob (author)shmikles2011-11-11

that's just the offset from the system clock. I haven't taken a look at this plugin for a long time, so posting on the bukkitdev page might get you more luck

author
shmikles (author)CyberJacob2011-11-12

ok, thanks

author
NatNoBrains (author)2011-06-26

This is someone else's work, you shouldn't be using it, anyway, it doesn't work on my server.

author
CyberJacob (author)NatNoBrains2011-06-26

could you be a little more helpful than 'dosen't work' ?

author
NatNoBrains (author)CyberJacob2011-06-26

The thing is, I don't know what's wromg with it, and I'm not trying any more.

author
CyberJacob (author)NatNoBrains2011-06-26

then I can't help you. please stop trolling.

author
NatNoBrains (author)CyberJacob2011-06-27

This is not your WORK!
Get rid of it, unless you have permission...

author
MrCantThinkOfAName (author)2011-06-10

Very nice! I've never used bukkit on my server before, I would love to use this, but could I still use my zMod? I have been using zMod since I bought the game, and I'd still like to be able to use it.

author
CyberJacob (author)2011-06-10

I did, that's half the reason I created this 'able

author
zazenergy (author)2011-06-10

You should totally enter this into the "make it tweet" contest!

About This Instructable

2,179views

6favorites

License:

More by CyberJacob:Tweeting Minecraft AI
Add instructable to: