An open API service indexing awesome lists of open source software.

https://github.com/razikus/groovylisteners


https://github.com/razikus/groovylisteners

Last synced: 6 months ago
JSON representation

Awesome Lists containing this project

README

          

# Purpouse
Simplify adding new listeners into Bukkit system.

# Usage
Write your Groovy script, then put into GroovyListenersPlugin folder in plugins. All of them will be loaded

# Example
```
import org.bukkit.event.Listener
import org.bukkit.event.EventHandler
import org.bukkit.event.block.BlockPlaceEvent
import org.bukkit.Bukkit;

class TestListener implements Listener {

@EventHandler
public void onBlockPlacement(BlockPlaceEvent e) {
eu.razniewski.groovylisteners.GroovyListenersPlugin.getInstance().getLogger().info("test222");
Bukkit.getLogger().info("test omg")
}

}
```

This listener will run when somebody will put block on the world. You have access to whole system, so you can write everything.
Save this example as example.groovy and put it on plugins/GroovyListenersPlugin/, then restart your server. That's all!

# Donate

Just buy me a coffee! It's very motivating :)

https://www.buymeacoffee.com/razikus

[](https://www.buymeacoffee.com/razikus)