> For the complete documentation index, see [llms.txt](https://docs.eliteminecraftplugins.com/elitepets/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.eliteminecraftplugins.com/elitepets/general-information/developer-api.md).

# Developer API

The Developer API for ElitePets.

The API for ElitePets is very extensive and allows you to create your own effects very easily.

```java
public class ElitePetsAPI {
 
    public HashMap<String, Pet> getPets();
 
    public void registerEffects(CustomEffect... customEffects);
 
    public boolean isPet(ItemStack itemStack);
 
    public Pet getPet(ItemStack itemStack);
 
    public int getLevel(ItemStack itemStack);
 
}
```

### To create your own custom effects

```yaml
Create a class that extends CustomEffect
Create the effect you want and set the name etc.

Register your custom effect using ElitePetsAPI.getPetAPI().registerEffects(
CustomEffect... customEffects);
ie. Test.class
```

### Custom Plugin Events

```yaml
PetLevelupEvent - Cancellable
Triggers when the pet levels up and activates the pets abilities

PetRemoveEvent
Triggers when pet is removed from players hotbar

CandyApplyEvent
Triggers when a rare candy is applied to a pet
```
