> For the complete documentation index, see [llms.txt](https://staffplusplus-minecraft.gitbook.io/tubing/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://staffplusplus-minecraft.gitbook.io/tubing/dependency-injection/event-listeners.md).

# Event Listeners

Event listeners can be annotated with a [@IocBukkitListener](/tubing/dependency-injection/annotations.md#iocbukkitlistener) annotation. This will make sure the event listener will be registered with Bukkit. This takes away the need to manage this yourself.

Notice the listener also is a [Tubing Bean](/tubing/tubing-core.md#beans). This means you can also inject any other dependency you want into this listener using the constructor

```java
@IocBukkitListener
public class PlayerJoinListener implements Listener {

    @EventHandler(priority = EventPriority.NORMAL)
    public void onJoin(PlayerJoinEvent event) {
        ...
    }
}
```
