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

# Custom Grind Sources

A grind source id is **just a string** — your plugin can invent one and get the full pipeline: pet XP, boosts, booster-style queries and swing animations. No registration step needed; pets opt in through their configs.

## 1. Pick an id

Convention: `<plugin>-<what>`, e.g. `myskyblock-break-crop`, `myskyblock-coins`.

## 2. Grant XP where the grinding happens

```java
EdPetsBuffsAPI buffs = EdPetsAPI.getInstance().getBuffsAPI();

@EventHandler
public void onCropBreak(MyCropBreakEvent event) {
    Player player = event.getPlayer();
    if (buffs.hasBuff(player, "myskyblock-break-crop")) {          // O(1), async-safe
        buffs.addExperience(player, "myskyblock-break-crop");      // one grind action
    }
    // make their pets swing (profile from animations.yml)
    EdPetsAPI.getInstance().getVisualsAPI().playGrindAnimation(player, "myskyblock-break-crop");
}
```

## 3. Apply boosts to your economy

```java
double percent = buffs.getBoost(player, "myskyblock-coins").doubleValue();
amount = amount * (1 + percent / 100.0);
```

## 4. Let servers configure pets for it

```yaml
# pets/<id>.yml on the server
leveling:
  sources:
    myskyblock-break-crop: { xp: 2, xp-increase-per-level: 0.2 }
buffs:
  myskyblock-coins: { base: 1.0, increase-per-level: 0.25 }
```

```yaml
# animations.yml
profiles:
  myskyblock-farming:
    sources: ['myskyblock-break-crop']
    held-item: NETHERITE_HOE
    swing: MAIN_HAND
```

That's the whole integration — the same pattern EdPets' own PinnaPrison/EdTools/EdDungeons/EdPrison hooks use.
