Skip to content


Subversion checkout URL

You can clone with
Download ZIP
Supposed to be a stats/achievements Bukkit plugin, but really it is an example of Clojure Bukkit plugins.
Fetching latest commit...
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.

Watership Down

Watership Down is an example of a Bukkit plugin written in Clojure. It is also endeavoring to be fully functional plugin that lets you track the stats of your players, and grant achievements based on those stats.

Classloader woes

What is there (which isn’t much, mind you) is currently compileable through lein, bundles up a plugin.yml, and sets the classpath in the manifest to a shared clojure lib in ../server/lib/. This is great, but there is a slight problem:

09:10:17 [SEVERE] Could not load 'plugins/watershipdown-0.1.jar' in folder 'plugins': 
	at clojure.lang.Namespace.<init>(
	at clojure.lang.Namespace.findOrCreate(
	at clojure.lang.Var.internPrivate(
	at net.jonnay.watershipdown.WatershipDown.<clinit>(Unknown Source)
	at java.lang.Class.forName0(Native Method)
	at java.lang.Class.forName(
	at org.bukkit.plugin.SimplePluginManager.loadPlugin(
	at org.bukkit.plugin.SimplePluginManager.loadPlugins(
	at org.bukkit.craftbukkit.CraftServer.loadPlugins(
	at org.bukkit.craftbukkit.CraftServer.<init>(
	at net.minecraft.server.ServerConfigurationManager.<init>(
	at net.minecraft.server.MinecraftServer.init(
Caused by: java.lang.RuntimeException: Could not locate clojure/core__init.class or clojure/core.clj on classpath: 
	at clojure.lang.Util.runtimeException(
	at clojure.lang.RT.<clinit>(
	... 15 more
Caused by: Could not locate clojure/core__init.class or clojure/core.clj on classpath: 
	at clojure.lang.RT.load(
	at clojure.lang.RT.load(
	at clojure.lang.RT.doInit(
	at clojure.lang.RT.<clinit>(
	... 15 more

From what I can glean, this has to do with the class loader. One option is to bundle a version of clojure with use-context-classloader set to false, which may work. (But involves building my own clojure.) Another option might be to look into the JavaPlugin class, and over-ride its behavior, especially with regards to the Java Plugin Loader. ( ) Not sure about that however.

Yet anotehr option involves using a Java delegate to load the clojure directly (but then, what is the point of compiling to java?) Like here or even here, which runs clojure through a reader and the evaluator:

From the Jira ticket here: it looks like we can set the context classloader inside of a subclass of javaplugin (probably called ClojurePlugin, funnily enough). This may have some serious implications with the bukkit classloader however.


Features, that are coming soon!

  • Stats are recorded based on typical bukkit events
  • When an achievement is earned, an event is posted!
  • If Spout is active, even more events are listened to
  • Uses a SqLite Database, and maybe MySQL too!
  • Dynamic Event listening, if I can make it go!
Something went wrong with that request. Please try again.