Some quick notes on publishing to a MQTT broker from within Minecraft using ScriptCraft and mqtt protocol. Get wmqtt.jar here...
http://www-01.ibm.com/support/docview.wss?rs=171&uid=swg24006006&loc=en_US&cs=utf-8&lang=en .
Follow these instructions to download and install the Mosquitto MQTT broker...
http://mosquitto.org/download/
Once Mosquitto is running, start Craftbukkit like this...
java -cp ia92/J2SE/wmqtt.jar:craftbukkit.jar org.bukkit.craftbukkit.Main
... to include wmqtt.jar in the classpath so that ScriptCraft can use it. Then add a minecraft event handler which when fired will publish to a mqtt broker like this...
var MqttClient = com.ibm.mqtt.MqttClient;
var connStr = 'tcp://localhost:1883';
var client = new MqttClient(connStr);
client.connect('scriptcraftjs.org', true, 5);
events.on('block.BlockBreakEvent', function (listener, event){
client.publish('blockbreak', [1], 1, false);
});
... and you have a hook from minecraft to mqtt. Wire up an arduino to subscribe to the 'blockbreak' topic on that broker and do something interesting.
FYI wmqtt.jar is outdated and deprecated, recommend Eclipse Paho instead - see eclipse.org/paho - Open Source and more modern.