This plugin provides embedded runtime for Scala programming language. It doesn't do anything by it's self.
Why do you Need it?
If you wanted to write a plugin in Scala instead of Java, this plugin will make your life a lot easier.
If you didn't use this plugin you would have to download scala-library.jar and put it in folder where CraftBukkit jar lies. Then you have to modify server startup command to include Scala runtime libraries in classpath. The change usually looks like this:
$ java -Xincgc -Xmx1G -cp "scala-library.jar:craftbukkit.jarr" org.bukkit.craftbukkit.Main
This plugin does pretty much the same, but utilizing Bukkit plugin infrastructure.
Ok, Cool how do I write Plugins in Scala
Check out my example scala plugin. This show's you how to handle Events.
Any plugins you write should just depend on libScala.
Plugins Written in Scala
Let me know if you have a plugin written in scala I will add it to my list.
- DancingLeds - currently unreleased.
Source Code
If your curious about the source code, check out my Git repo. Currently I am using Gradle to build my projects. I find it suits my needs far better then maven.
Future
I will be supplementing the Bukkit API with functional wrappers.
Here is an example:
org.bukkit.scheduler.scheduleAsyncDelayedTask(Plugin plugin, Runnable task, long delay)
Having that Runnable, in the middle like that, means I can't just tack on a closure. I want to use it like:
scheduleAsyncDelayedTask(someDelay) { DoStuff() DoMoreStuff() }
Inspiration and Thanks
To the McGroovy team, showed me that Bukkit plugins didn't have to be only written in java. That project was a direct inspiration for this.