# EdTools API

Welcome to the developer API documentation for EdTools. This guide will help you understand how to interact with the various systems within the plugin.

### Download

Download the API and import it as a system dependency.

{% embed url="<https://drive.google.com/file/d/1dk64GDGiGPdF60kK9r2HnaB7TVTFYBam/view?usp=sharing>" %}

### Getting the API Instance

To access any of the plugin's functionalities, you must first get the main API instance. All sub-APIs (like Currency, Boosters, etc.) are accessible through this main class.

The API is only available after the EdTools plugin has been fully loaded. Make sure your plugin loads after EdTools by adding `EdTools` to the `depend` or `softdepend` list in your `plugin.yml`.

**Example `plugin.yml`:**

```yaml
name: YourPlugin
version: 1.0
main: com.yourdomain.yourplugin.Main
depend: [EdTools]
```

**How to get the instance:**

```java
import es.edwardbelt.edgens.iapi.EdToolsAPI;

public class YourPluginClass {

    public void onEnable() {
        if (getServer().getPluginManager().getPlugin("EdTools") != null) {
            EdToolsAPI api = EdToolsAPI.getInstance();
            // You can now access all other APIs
            // For example: api.getCurrencyAPI().getCurrency(player.getUniqueId(), "gems");
        }
    }
}
```

The main `EdToolsAPI` interface provides access to all specialized APIs:

* `getEnchantAPI()`
* `getLuckyBlocksAPI()`
* `getGuisAPI()`
* `getZonesAPI()`
* `getOmniToolAPI()`
* `getCurrencyAPI()`
* `getBoostersAPI()`
* `getBackpackAPI()`
