Clojure on Bukkit minecraft server
This morning, I finally managed to get the basic skeleton of the bukkit clojure plugin “host” working correctly. Clojure doesn’t like having to straddle across classloaders in order to find the resources it needs! I can’t say I blame it🙂
It’s a fantastic feeling being able to code plugin stuff on the fly – and as a glimpse into that world, I’ve created a small timelapse video demo’ing some basic possibilities. Apply some imagination though, I’m sure you’ll come up with some awesome stuff..
Most importantly for me is the exploratory nature of Clojure – It fits very well into the nature of Minecraft. It’s thrilling to be able to discover and tweak code for your plugin on the fly.. But see for yourself: Make it full screen btw.
And yes. I get killed by a spider.
Check out the code that makes this little thing tick:
The Clojure plugin source is at : https://github.com/CmdrDats/clj-minecraft
The code (memorystone v2) used in this video: https://github.com/CmdrDats/clj-memorystone
I’m planning to build a leiningen template so that starting a new clojure bukkit plugin is as simple as lein new bukkit-plugin [plugin-name]. I’m also re-implementing my MemoryStone plugin just so that I have a base to work from in order to really flesh out the shared clojure library.
One idea I’m toying with is making a more intuitive way of registering listeners to Bukkit. I’m not sure if I’ll actually end up with anything other than a convenience wrapper function for .registerEvent, but it’s worth messing with.
As you can see in the clj-minecraft project, I’m wanting to provide a fairly solid set of basic plugin building blocks so that you have simple access to the fundemental building blocks of plugins. My goal is also to implement and wrap some common plugins, such as SpoutCraft and the various Economy managers.
I would like the 3rd party libraries to be supported in a way that automatically “switches off” when the plugins aren’t present, so that plugin developers don’t have to worry about it besides actually making sure they have alternative methods of using their plugins.. But we’ll see as I thresh this out.
Feedback will be hugely appreciated and I always welcome a helping hand! So please, contact me, fork my repo’s and make pull requests!