McGroovy
McGroovy
This plugin provides embedded runtime for Groovy programming language. It does very little in itself, but the runtime is very powerful for rapid plugin development.
Latest release jar: http://dev.bukkit.org/media/files/576/322/McGroovy.jar
But, what does it do? Why do I need it anyway?
Short answer? It providers org.codehaus.groovy package to all plugins running on the server (loads at startup, instead of post-world).
Detailed answer: Some plugins written in Java are using Groovy to provide scripting capability. There are also plugins written entirely in Groovy, but still depending on the very same Groovy runtime.
Traditionally, you have to download groovy-all-1.8.6.jar and put it in folder where CraftBukkit jar lies. Then you have to modify server startup command to include Groovy runtime libraries in classpath, which may be hassle, or not even possible with certain hosted setups. The change usually looks like this:
$ java -Xincgc -Xmx1G -cp "groovy-all-1.8.6.jar:craftbukkit-0.0.1-SNAPSHOT.jar" org.bukkit.craftbukkit.Main
This plugin does pretty much the same, but utilizing Bukkit plugin infrastructure. You just put McGroovy.jar inside plugins/ and you're done, instead of the above marathon.
Plugins working with/depending on McGroovy
How can I write a plugin entirely in Groovy?
The code and interfaces closely resemble java, however...you'd better check out this example plugin
Expressive, uh? Doing all that in java with 10 times more LOC is usually not an overstatement.
To compile your groovy code, use maven with this pom.xml as a template. If you know what you're doing, just roll your own from archetype.
Source code
There is no sourcecode to speak of, just some maven magic to package everything in .jar + plugin.yml so plugins written in groovy can reference to it.
Comments