[DEV/ADMN/EDIT/GEN/MISC/CHAT/TP] GroovyBukkit v0.6.5.2 - groovy scripting module [1150]

Discussion in 'Inactive/Unsupported Plugins' started by K S, Jan 19, 2011.

  1. Offline

    K S

    GroovyBukkit - The Groovy Plugin:
    Version: v0.6.5.2

    This is a Plugin for executing commands written in Groovy, or scripts written in Groovy. It can also register event listeners and pull remote scripts so it is like a plugin for writing 'groovy' plugins.

    See http://groovy.codehaus.org/ for information about the Groovy language.

    Features:
    • Create scripts using the dynamic Groovy language
    • Full access to the CraftBukkit api
    • Simplified event handling, threads/futures, block/material/item editing
    • Very powerful plot protection mechanism built it, also allows for creating "adventure-type" plots by specifying exactly what visitors and/or public can/can't do with in defined area (place/break/interact lists, etc.)
    Download The Groovy Plugin
    Source Code: https://github.com/krsmes/GroovyBukkit

    Changelog:
    Version 0.6.5.x
    • Included an orb_remover startup script (delete this script if you like experience orbs) - prevents server lag do to orb accumulation in 1.8.x
    Version 0.4 − 0.6
    • Plot-protection mechanism built in (in Java for speed)
    • Many updates to default scripts
    • 'containers.groovy' script for chest protection and vending machines
    • Groovy 1.8 support
    Version 0.3
    • Added ability to add your own /... commands from script
    • Basic permissions implemented for /g and other custom commands
    • Custom Events: HOUR CHANGE and DAY CHANGE
    • Lots of sample scripts (powertools, plots, warps, etc.)
    Version 0.2
    • Added ability to run script files, including remote scripts
    • System startup scripts (and player specific login script)
    • Event handling support
    Version 0.1
    • Basic 'groovyified' api, "/g" command for running scriptlets within the Minecraft client
    This is more a developer oriented plugin but you can do anything with it as it exposes the entire Bukkit api and provides access to net.minecraft objects too. Great for learning the API, debugging other plugins, or just messing around.

    Please see the README on github for lots of details

    Additional help documentation

    Attached files:
    • GroovyBukkit.jar.zip - the plugin jar built from code on github, unzip and place in plugins
    • scripts.zip - a set of 'standard' scripts (also on github), unzip to plugins/GroovyBukkit/scripts
    Download the latest Groovy jar from http://groovy.codehaus.org/Download
     

    Attached Files:

    xpansive, madman and tommytony like this.
  2. Offline

    Binaryclock

    That is amazing. You have created an online parser to be used in-game? Thank you so much, this is great!
     
  3. Offline

    K S

    Maybe I should have put this in the Plugin Development forum… probably would get more interested there.
     
  4. Offline

    Eris

    Whoa damn, I started doing this too, but then I stopped at the point where I basically had it running scripts that had access to the server object and the calling player object. I commend you for going all the way.

    Can we have Permissions support so's I can restrict this magic to myself, the admin? :)
     
  5. Offline

    tommytony

    This is quite nuts. Did you send a pull request to the bukkit main for the handler unregistration?

    Incredible.
     
  6. Offline

    madman

    Dude Your Awesome But You Need To Add More Tutorials
     
  7. Offline

    xpansive

    Awesome! But there's a little typo in your readme:

    java -Xmx1g -cp groovy-all-1.7.6.jar;craftbukkit.jar org.bukkit.craftbukkit.Main nogui
    Semicolon, not colon ___________↑

    Edit:
    Another glitch:
    in GroovyRunner.groovy in this method:
    register(String uniqueName, Map listener, Event.Priority priority = Priority.Normal),
    it says
    registered << plugin.server.pluginManager.registerEvent(type, typedListener, priority, this)
    and it needs to be this:
    registered << plugin.server.pluginManager.registerEvent(type, typedListener, priority, plugin)


    Otherwise, best plugin ever!

    I already made a bunch of scripts!
     
  8. Offline

    EvilSeph

  9. Offline

    xpansive

    Also, it appears to be broken as of ~build 170, it just spits back the help info:
    /g code - Evaluates the given script code

    edit: this fixes it:
    boolean onCommand(CommandSender player, Command cmd, String commandLabel, String[] args) {
     
  10. Offline

    K S

    This has been completely updated/rewritten since I first posted this. I believe it follows all the recommended guidelines. It now supports permissions and writing custom commands (see scripts/startup/whitelist.groovy for an example).

    I'm not on this forum much but if you have any questions or idea I'd be happy to help out. You're more likely to get a timely response with github messages if you have an account there.

    I'm thinking of making a grails wrapper to craftbukkit so it could be web administered...
     
  11. Offline

    Clem

    This is a bit of a problem for me because I am not a very experienced programmer, but since I bought a server (BroHoster) I can't control what is running; I can't add this unless I can put this in the plugins folder... Any ideas? Nice job by the way! =D
     
  12. Offline

    MonsieurApple

    Please update your release to meet our Plugin Release/Submissions Guidelines.

    Also, this is considered inactive.
     
  13. Offline

    K S

    This is definitely not inactive (very active on GitHub mostly though), I've updated the text using the latest template, any way to get it off the inactive list?
     
  14. Offline

    MonsieurApple

    Sure, you just need to fix your title then I will move it back.
     
  15. Offline

    K S

    done.
     
  16. Offline

    MonsieurApple

  17. Offline

    K S

    A new "orb_remover.groovy" script was added to the startup scripts in github:

    Code:
    import net.krsmes.bukkit.groovy.GroovyRunner
    import org.bukkit.event.player.PlayerRespawnEvent
    import org.bukkit.event.Event
    import org.bukkit.event.entity.EntityDeathEvent
    
    
    def orbRemove(GroovyRunner runner) { runner.e('experienceOrb')*.remove() }
    
    
    [
            (Event.Type.PLAYER_RESPAWN): { GroovyRunner r, PlayerRespawnEvent e ->
                orbRemove(r)
            },
    
            (Event.Type.ENTITY_DEATH): { GroovyRunner r, EntityDeathEvent e ->
                orbRemove(r)
                r.future(20, true) { orbRemove(r) }
            }
    
    ]
     
  18. Offline

    Shocks

    Code:
    20:25:58 [INFO] This server is running Craftbukkit version git-Bukkit-0.0.0-1067
    -g6301507-b1185jnks (MC: 1.8.1)
    20:25:58 [SEVERE] Could not load 'plugins\GroovyBukkit.jar' in folder 'plugins':
    
    java.lang.NoClassDefFoundError: groovy/lang/GroovyObject
            at java.lang.ClassLoader.defineClass1(Native Method)
            at java.lang.ClassLoader.defineClass(Unknown Source)
            at java.security.SecureClassLoader.defineClass(Unknown Source)
            at java.net.URLClassLoader.defineClass(Unknown Source)
            at java.net.URLClassLoader.access$100(Unknown Source)
            at java.net.URLClassLoader$1.run(Unknown Source)
            at java.net.URLClassLoader$1.run(Unknown Source)
            at java.security.AccessController.doPrivileged(Native Method)
            at java.net.URLClassLoader.findClass(Unknown Source)
            at org.bukkit.plugin.java.PluginClassLoader.findClass(PluginClassLoader.
    java:36)
            at org.bukkit.plugin.java.PluginClassLoader.findClass(PluginClassLoader.
    java:24)
            at java.lang.ClassLoader.loadClass(Unknown Source)
            at java.lang.ClassLoader.loadClass(Unknown Source)
            at java.lang.ClassLoader.defineClass1(Native Method)
            at java.lang.ClassLoader.defineClass(Unknown Source)
            at java.security.SecureClassLoader.defineClass(Unknown Source)
            at java.net.URLClassLoader.defineClass(Unknown Source)
            at java.net.URLClassLoader.access$100(Unknown Source)
            at java.net.URLClassLoader$1.run(Unknown Source)
            at java.net.URLClassLoader$1.run(Unknown Source)
            at java.security.AccessController.doPrivileged(Native Method)
            at java.net.URLClassLoader.findClass(Unknown Source)
            at org.bukkit.plugin.java.PluginClassLoader.findClass(PluginClassLoader.
    java:36)
            at org.bukkit.plugin.java.PluginClassLoader.findClass(PluginClassLoader.
    java:24)
            at java.lang.ClassLoader.loadClass(Unknown Source)
            at java.lang.ClassLoader.loadClass(Unknown Source)
            at java.lang.Class.forName0(Native Method)
            at java.lang.Class.forName(Unknown Source)
            at org.bukkit.plugin.java.JavaPluginLoader.loadPlugin(JavaPluginLoader.j
    ava:168)
            at org.bukkit.plugin.SimplePluginManager.loadPlugin(SimplePluginManager.
    java:213)
            at org.bukkit.plugin.SimplePluginManager.loadPlugins(SimplePluginManager
    .java:136)
            at org.bukkit.craftbukkit.CraftServer.loadPlugins(CraftServer.java:138)
            at org.bukkit.craftbukkit.CraftServer.<init>(CraftServer.java:103)
            at net.minecraft.server.ServerConfigurationManager.<init>(ServerConfigur
    ationManager.java:52)
            at net.minecraft.server.MinecraftServer.init(MinecraftServer.java:136)
            at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:348)
            at net.minecraft.server.ThreadServerApplication.run(SourceFile:417)
    Caused by: java.lang.ClassNotFoundException: groovy.lang.GroovyObject
            at java.net.URLClassLoader$1.run(Unknown Source)
            at java.net.URLClassLoader$1.run(Unknown Source)
            at java.security.AccessController.doPrivileged(Native Method)
            at java.net.URLClassLoader.findClass(Unknown Source)
            at org.bukkit.plugin.java.PluginClassLoader.findClass(PluginClassLoader.
    java:36)
            at org.bukkit.plugin.java.PluginClassLoader.findClass(PluginClassLoader.
    java:24)
            at java.lang.ClassLoader.loadClass(Unknown Source)
            at java.lang.ClassLoader.loadClass(Unknown Source)
            ... 37 more
    20:25:58 [INFO] Preparing level "Beard"
    Not sure what I am doing wrong. I got GroovyBukkit.jar in the plugins that I downloaded from this page, and I have groovy-all-1.8.2.jar in my main MC folder.

    Nevermind, I figured it out. I spelled the groovy.jar's name wrong
     

Share This Page