https://github.com/razikus/groovylisteners
https://github.com/razikus/groovylisteners
Last synced: 6 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/razikus/groovylisteners
- Owner: Razikus
- License: apache-2.0
- Created: 2018-07-10T18:44:25.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2018-07-11T11:09:02.000Z (over 7 years ago)
- Last Synced: 2025-02-16T11:29:10.857Z (8 months ago)
- Language: Java
- Size: 12.7 KB
- Stars: 2
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
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)