# Quick Start

## 1. Add Dependency

Check the latest version on [Github](https://github.com/ItsHarshXD/ZentrixAPI).

**Gradle:**

```kotlin
repositories {
    maven("https://jitpack.io")
}

dependencies {
    compileOnly("com.github.ItsHarshXD:ZentrixAPI:latestVersion")
}
```

**Maven:**

```xml
<repositories>
    <repository>
        <id>jitpack.io</id>
        <url>https://jitpack.io</url>
    </repository>
</repositories>

<dependency>
    <groupId>com.github.ItsHarshXD</groupId>
    <artifactId>ZentrixAPI</artifactId>
    <version>latestVersion</version>
    <scope>provided</scope>
</dependency>
```

## 2. Create Main Class

```java
public final class MyAddon extends ZentrixAddon {
    @Override
    protected void onAddonEnable() {
        // Access the API
        ZentrixAPI api = ZentrixAPI.get();
        
        // Use services
        api.getGameService().getActiveGames();
        
        // Register listeners
        getServer().getPluginManager().registerEvents(new MyListener(), this);
    }
}
```

## 3. Add plugin.yml

```yaml
name: MyAddon
version: 1.0.0
main: com.example.myaddon.MyAddon
depend: [Zentrix]
api-version: '1.21'
```

## 4. Use the API Anywhere

```java
// Single, simple way to access the API
ZentrixAPI api = ZentrixAPI.get();
api.getGameService().getActiveGames();
api.getCurrencyService().getBalance(player);
```
