> For the complete documentation index, see [llms.txt](https://plugins-1.gitbook.io/plugins/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://plugins-1.gitbook.io/plugins/plugin/welcomerewards/developers.md).

# Developers

## WelcomeRewardEvent

This event is fired when the player redeems a piggy bank.

```java
@EventHandler
public void onPlayerWelcome(WelcomeRewardEvent e) {
    Player player = e.getPlayer();
    
    // Get player being welcomed.
    String target = e.getTarget();
    
    // Get rewards that player will receive.
    List<String> rewards = e.getRewards();
    
    // The time taken to welcome the player.
    Long timeTaken = e.getTimeTaken();
    
    // Is the event cancelled? Returns boolean.
    event.isCancelled();
    
    // Should we cancel the event?
    event.setCancelled(boolean)

}
```
