Skip to content

ItsHarshXD/ZentrixAPI

Repository files navigation

ZentrixAPI

Javadoc

Developer API for creating Zentrix Battle Royale addons. Version 1.5.0 adds LocaleService for addon-safe access to Zentrix locale messages and text formatting while retaining the 1.4.0 binary surface.

Resources

Features

  • Query games, players, teams, phases, and stats
  • React to gameplay via events
  • Register custom recipes with craft limits
  • Store addon data under plugins/Zentrix/addons/<addon-id>/
  • Resolve copied game-* instances and their waiting, Nether, and deathmatch worlds
  • Query and control Nether access, deathmatch startup, force-start, and dynamic game rules
  • Use party and runtime-game-scoped chat services

Installation

Gradle (Kotlin DSL)

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

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

Gradle (Groovy)

repositories {
    maven { url 'https://jitpack.io' }
}

dependencies {
    compileOnly 'com.github.ItsHarshXD:ZentrixAPI:1.5.0'
}

Maven

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

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

Quick Start

1. Create Your Addon

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);
    }
}

2. Add plugin.yml

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

3. Use the API Anywhere

// Single, simple way to access the API
ZentrixAPI api = ZentrixAPI.get();
api.getGameService().getActiveGames();
api.getCurrencyService().getBalance(player);
API Compatible plugin Notes
1.1.x Zentrix 1.2.x+ Legacy services
1.3.0 1.3.0-capable development builds Runtime worlds and typed controls
1.4.0 1.4.0+ Dynamic sources and atomic matchmaking
1.5.0 1.5.0+ LocaleService for addon text formatting

Requirements

  • Java 21+
  • Paper 1.21.9-.1.21.10
  • Zentrix plugin

License

All Rights Reserved

About

Developer API designed for creating and extending custom addons within Zentrix

Resources

Stars

Watchers

Forks

Packages

 
 
 

Contributors

Languages