Resource GroovyListeners

Discussion in 'Spigot Plugin Development' started by Razikus, Jul 11, 2018.

  1. Hi, i've just ended my new plugin.

    It allows to develop Listeners with groovy.

    All you need to do is put the jar file in plugins folder, and write new classes that are extending Listener

    Example is here:

    See my other post with longer description:

    No need to develop separate plugins for simple listeners, but allows to use whole Bukkit API.

    #1 Razikus, Jul 11, 2018
    Last edited: Jul 11, 2018
  2. Praya


    you cannot adv your plugin like this.

    spigot rules:

    Code (YAML):
    6. Do not post content in the wrong category
    6.1. Spigot has several categories available to allow us to keep content organized. Please post in the correct category, and if you are unsure, post it in what you think is the closest match.
    7. No advertising servers, products, or services outside of the "Services & Recruitment" section.
    7.3. Threads and posts advertising or requesting products/services will be removed without warning. This includes hosting services and YouTube videos.
    • Agree Agree x 1
    • Informative Informative x 1
  3. Just want to show other developers, that they have now more options.

    Sorry for breaking rules
  4. Where are the options? What should it improve?
    The only thing is that you calling a method in an Bukkit event listener.
    Please show an example that expresses your improvement.
  5. MiniDigger


    its groovy, not java, its interpreted, not compiled.
    its basically skript, but good.
    • Like Like x 1
    • Winner Winner x 1
  6. Oh I see now. I simply ignored the file extension.
    Sorry for being rude.
  7. MiniDigger


    I mean, the title of this post and the resource and the repo should have given it away :p
    • Agree Agree x 1
  8. Okay. So i have to make a longer description.

    Main problem for me with developing plugins for Minecraft were that every time i changed something in my Java code i have to compile, redeploy and restart the server. This is very annoying, especially when you are doing a little plugins that are solving little problems (like simple listener).

    There is already a solution like Skript, that is very nice, but it will be never good like standard Java.

    Solution that i'm proposing is - Groovy

    Read about it here

    Example that i gave in the link is very simple Groovy script, but when you think about it more - it contains essence of this plugin.
    This script will be interpreted, included int osystem, and Listener will be registered when plugin will start. And you have full access to Spigot system.
    So you can just make a changes and restart server (implementing reload command will be next step - just need to unregister all listeners, and reregister it again).

    You can add new Listeners without changing internal code, without writing new plugin - just make a groovy script, and put it into plugin folder.

    Look at this video example:

    • No compiling
    • No internal plugin change
    • Access to whole Bukkit system (you can for example access with it to other plugins via
      Plugin plugin = Bukkit.getServer().getPluginManager().getPlugin("pluginname");
    • Lot of possibilities with power of JVM
    • Full access to Java API
    #8 Razikus, Jul 11, 2018
    Last edited: Jul 11, 2018
    • Winner Winner x 1
  9. very nice, but you can live debug with java using IDEs like Intellij & Eclipse (I'm pretty sure Eclipse can do it). But it does solve the problem of making small listeners without making a plugin (since with live debug you have to compile at least once) and it involves no skript :D. Nice/