> For the complete documentation index, see [llms.txt](https://jpprison.gitbook.io/jpprison-docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://jpprison.gitbook.io/jpprison-docs/developer-api/api-evolution-pickaxe.md).

# API — Evolution Pickaxe

#### Reading

int getPickaxeLevel(ItemStack pickaxe)int getPickaxeXP(ItemStack pickaxe)int getBlocksMined(ItemStack pickaxe)int getEnchantmentLevel(ItemStack pickaxe, String enchantId)int getRequiredXP(int level)int getTotalBlocksMined(UUID uuid) — pickaxe-independent historical total

#### Writing

int addPickaxeXP(ItemStack pickaxe, Player player, int amount) — **recommended**void setPickaxeLevel(ItemStack pickaxe, Player player, int level)void setPickaxeXP(ItemStack pickaxe, Player player, int xp)void setBlocksMined(ItemStack pickaxe, Player player, int blocks)void addBlocksMined(ItemStack pickaxe, Player player, int amount)void setEnchantmentLevel(ItemStack pickaxe, String enchantId, int level, Player player)void updatePickaxe(ItemStack pickaxe, Player player, int blocks, int pickaxeLevel, int xp, Map\<String, Integer> enchantments)

```
// Give pickaxe XP (with automatic level-up)
ItemStack pick = player.getItemInHand();
if (pick != null && pick.getType() == Material.DIAMOND_PICKAXE) {
    int newLevel = JPPrisonAPI.addPickaxeXP(pick, player, 500);
    player.sendMessage("Pickaxe is now level " + newLevel + "!");
}

// Staff: reset pickaxe
JPPrisonAPI.setPickaxeLevel(pick, target, 1);
JPPrisonAPI.setPickaxeXP(pick, target, 0);
JPPrisonAPI.setBlocksMined(pick, target, 0);
```

**⚠ Important**

The pickaxe state is stored as **text in the visible lore**. *Never* modify the lore with `ItemMeta#setLore()`. Always use `JPPrisonAPI` methods instead.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://jpprison.gitbook.io/jpprison-docs/developer-api/api-evolution-pickaxe.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
