# Boosters API

The `EdToolsBoostersAPI` provides methods for managing player and global boosters, which can multiply currency earnings or provide other benefits.

### Get API Instance

```java
EdToolsBoostersAPI boostersAPI = EdToolsAPI.getInstance().getBoostersAPI();
```

***

### Methods

#### `getBoosterValueByEconomy(UUID uuid, String economy)`

Calculates the total booster multiplier for a specific player and currency type.

* **`uuid`**: The player's unique ID.
* **`economy`**: The name of the currency (e.g., "gems").
* **Returns**: A `double` representing the combined multiplier.

#### `getBoosterValueGlobalEnchants(UUID uuid)`

Gets the total booster value for global enchantments for a specific player.

* **`uuid`**: The player's unique ID.
* **Returns**: A `double` representing the enchant booster multiplier.

#### `getActiveBoosters(UUID uuid)`

Retrieves a list of all active booster IDs for a player.

* **`uuid`**: The player's unique ID.
* **Returns**: A `List<String>` of booster IDs.

#### `removeBooster(UUID uuid, String boosterId)`

Removes a specific booster from a player.

* **`uuid`**: The player's unique ID.
* **`boosterId`**: The unique ID of the booster to remove.

#### `existsBooster(UUID uuid, String boosterId)`

Checks if a player has a specific active booster.

* **`uuid`**: The player's unique ID.
* **`boosterId`**: The unique ID of the booster.
* **Returns**: `true` if the booster exists and is active, otherwise `false`.

#### `getBoosterCurrency(UUID uuid, String boosterId)`

Gets the currency a specific booster applies to.

* **`uuid`**: The player's unique ID.
* **`boosterId`**: The unique ID of the booster.
* **Returns**: A `String` with the name of the economy, or null if it's an enchant booster.

#### `isBoosterEnchantType(UUID uuid, String boosterId)`

Checks if a booster is for enchants instead of a currency.

* **`uuid`**: The player's unique ID.
* **`boosterId`**: The unique ID of the booster.
* **Returns**: `true` if it's an enchant booster, `false` otherwise.

#### `getBoosterName(UUID uuid, String boosterId)`

Gets the display name of a booster.

* **`uuid`**: The player's unique ID.
* **`boosterId`**: The unique ID of the booster.
* **Returns**: The `String` display name.

#### `getBoosterMultiplier(UUID uuid, String boosterId)`

Gets the multiplier value of a specific booster.

* **`uuid`**: The player's unique ID.
* **`boosterId`**: The unique ID of the booster.
* **Returns**: A `double` representing the multiplier.

#### `getBoosterDuration(UUID uuid, String boosterId)`

Gets the total initial duration of the booster in seconds.

* **`uuid`**: The player's unique ID.
* **`boosterId`**: The unique ID of the booster.
* **Returns**: A `long` representing the total duration.

#### `getBoosterRemainingTime(UUID uuid, String boosterId)`

Gets the remaining time on a booster in seconds.

* **`uuid`**: The player's unique ID.
* **`boosterId`**: The unique ID of the booster.
* **Returns**: A `long` with the remaining time.

#### `addBooster(...)`

Adds a new booster to a player.

* **`uuid`**: The player's unique ID.
* **`boosterId`**: A unique identifier for this new booster.
* **`boosterName`**: The display name of the booster.
* **`economy`**: The currency this booster affects (can be an enchant or a currency, it can also be empty to make it enchant global booster).
* **`multiplier`**: The booster multiplier (e.g., 1.0 for a 2x boost).
* **`duration`**: The duration of the booster in seconds.
* **`enchantBooster`**: Set to `true` if this is an enchant booster.
* **`saveDB` :** If the booster will be saved in the database. If so, it will keep between server restarts.

#### `setBooster...` methods

The API also provides setters (`setBoosterMultiplier`, `setBoosterDuration`, etc.) to modify existing boosters. Their parameters match the corresponding getters.
