> For the complete documentation index, see [llms.txt](https://docs.olziedev.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.olziedev.com/projects/playereconomy/api/events.md).

# Using Events

In Player Economy you can listen to events using the API, this will allow you to listen to events that happen in the plugin. It uses the Bukkit event system so you should be familiar with that.

## Examples

Here is an example of a listener class, this will let you be able to listen to events that happen in the plugin. Here is a list of events you can listen for Economy [here](https://javadocs.olziedev.com/playereconomy/com/olziedev/playereconomy/api/events/player/package-summary.html).

```java
import com.olziedev.playereconomy.api.player.EPlayer;
import com.olziedev.playereconomy.api.events.player.PlayerEconomyDepositEvent;
import org.bukkit.entity.Player;
import org.bukkit.event.EventHandler;
import org.bukkit.event.Listener;

public class ExampleEvents implements Listener {

    @EventHandler
    public void onEcoDeposit(PlayerEconomyDepositEvent event) {
        EPlayer player = event.getEcoPlayer();
        double amount = event.getAmount();
    }
}
```
