# Custom Events

## `EdPrisonAddCurrencyEvent(Player player, String currency, double amountAdded)`

Triggers when an amount of currency is added to a player.

## `EdPrisonAutoSellEvent(Player player, Material materialSold, double amountSold)`

Triggers when an amount of a material is sold via the autosell.

## `EdPrisonEnchantTriggerEvent(Player player, String enchant)`

Triggers when any enchant is triggered

## `EdPrisonPossibleEnchantTriggerEvent(Player player, String enchant, double percent)`

Triggers when any enchant can be triggered(before calculating the trigger chance) By this you can put more trigger chance percent in any enchant.

## `EdPrisonExplosiveEnchantTriggerEvent(Player player, String enchant, double blocksBroken)`

Triggers when any explosive enchant is triggered. (jackhammer, laser, boomfish, suicidalminions, quake, strike, meteorite, wildwither, nuke, plague, etc)

## `EdPrisonKeyFinderEnchantTriggerEvent(Player player, String cmd)`

Triggers when key finder enchant is triggered. "cmd" variable is the command that keyfinder has executed.

## `EdPrisonTokenMinerEnchantTriggerEvent(Player player, double tokens)`

Triggers when token miner enchant is triggered. You can get the value "tokens" that are the tokens that the player has received.

## `EdPrisonGangCreated(Player player, String gangName)`

Triggers when a gang is created by a player

## `EdPrisonGangDisbanded(String enchant)`

Triggers when a gang is disbanded

## `EdPrisonGangExecuteCommand(Player player, String[] args)`

Triggers when /gang \[args...] is executed, you can get any of the args.

## `EdPrisonGangJoined(Player player, String gangName, Player playerJoined)`

Triggers when a player joins a gang(player and playerJoined are the same)

## `EdPrisonGangLeft(Player player, String gangName, Player playerLeaved)`

Triggers when a player leaves a gang(player and playerLeaved are the same)

## `EdPrisonGetPrestigeCurrencyCostEvent(Player player, double amount)`

Triggers when the prestige cost is got. With this event you can low the amount that the prestige costs.

## `EdPrisonGetRankupCurrencyCostEvent(Player player, double amount)`

Triggers when the rankup cost is got. With this event you can low the amount that the rankup costs.

## `EdPrisonUpdatePickaxeEvent(Player player)`

Event triggered when a player's pickaxe is updated.

## `EdPrisonQuitSaveData(Player player)`

Event triggered just before saving the data when a players leaves the server.


---

# Agent Instructions: 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:

```
GET https://edwardbelt.gitbook.io/edprison-core-documentation/developer-api/custom-events.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
