Getting Started

Developer API

Voxy publishes a set of API modules so other plugins can read player data, adjust economy balances, look up ranks and guilds, issue punishments, and react to Voxy events.

This section is a task-oriented guide to the published API. It covers only the four API artifacts below - the rest of Voxy is internal and not part of the supported surface.

Modules

Artifact Purpose
voxy-api Common, platform-agnostic data and services (the VoxyAPI entry point and its managers)
voxy-spigot-api Spigot / Paper events (party, punishment, rank, vanish)
voxy-velocity-api Velocity events (private message, server switch)
voxy-bungee-api BungeeCord events (private message, server switch)

Depend on voxy-api for reading and mutating data. Add the module that matches your platform when you also want to listen to Voxy events.

Voxy and all of its API modules are built for Java 21. Your build and runtime must use Java 21 or newer.

Add the repository

The API artifacts are published to the GraveMC repository.

{` gravemc https://repo.gravemc.net/releases/ `} {` repositories { maven { url = uri("https://repo.gravemc.net/releases/") } } `} {` repositories { maven("https://repo.gravemc.net/releases/") } `}

Add the dependency

Add the common voxy-api module:

Voxy is present at runtime, so the API should not be shaded into your jar. Change implementation to compileOnly (Gradle) or add <scope>provided</scope> (Maven).

Sources and Javadoc jars are published alongside each artifact, so your IDE can attach them for inline documentation.

Add Voxy as a depend (or softdepend) in your plugin.yml so it loads before your plugin and the API is ready when you enable.

Obtain the API

The entry point is the abstract VoxyAPI class. Voxy registers the implementation on startup; retrieve it with the static accessor and guard for null in case Voxy has not loaded yet:



VoxyAPI api = VoxyAPI.getAPI();
if (api == null) {
    getLogger().warning("Voxy is not loaded - skipping integration.");
    return;
}

Available managers and services

Everything hangs off VoxyAPI. Each getter returns a manager or service for a specific domain:

Getter Type Covered in
getDataManager() DataManager Player Data
getEconomyService() EconomyService Economy
getRankManager() RankManager Ranks & Permissions
getPartyManager() PartyManager Guilds & Parties
getPunishmentManager() PunishmentManager Moderation
getLadderManager() LadderManager Moderation
getReportsManager() ReportsManager Moderation
getLevelManager() LevelManager Progression
getRewardService() RewardService Progression
getFilterManager() FilterManager Other Services
getAnalyticsProvider() AnalyticsProvider Other Services
getVPNManager() VPNManager Other Services
getCooldownManager() CooldownManager Other Services
getServerInfo() ServerInfo this page
getSettings() VoxySettings this page

There is no guild manager on VoxyAPI. Read a player's guild through PlayerData.getGuild() (see Guilds & Parties). Guild mutation is not part of the published API.

Server info

getServerInfo() returns a ServerInfo describing the current server or proxy node (its name, identifier, and group), which is useful when writing logic that behaves differently per server or per group.