With this mod you can use groovy to script minecraft.
This also works as an extension to CraftTweaker. It allows you to use groovy instead ZS for CraftTweaker and therefore have a simpler syntax.
Here is an example of what it can do:
I recommend using IntelliJ for highlighting and code completion as it is much easier to work with it that way.
Events to hook into are (currently):