Introduction
Integrate Nexa gamepass purchases and ownership checks into your Minecraft server.
Nexa Developer API
The Nexa Developer API allows Minecraft server developers to integrate Nexa gamepass purchases and ownership verification directly into their plugins.
Installation
- Install the Nexa Developer API plugin on your server. Download Here
- Start the server once to generate the configuration files.
- Open the generated configuration file and add your Nexa Game Token.
- Restart the server.
Getting the API Instance
import org.iamiak.nexaDeveloperAPI.NexaDeveloperAPI;
import org.iamiak.nexaDeveloperAPI.NexaAPI;
NexaDeveloperAPI plugin =
(NexaDeveloperAPI) getServer().getPluginManager().getPlugin("NexaDeveloperAPI");
NexaAPI nexaAPI = plugin.getNexaAPI();Plugin Startup Validation
When the server starts, Nexa Developer API automatically validates the configured Game Token.
Valid Token
Server log:
Token is Verified and Is Valid!Invalid Token
Server log:
Token is Invalid!The server will shut down automatically.
Missing Token
Server log:
Game Token not set in Config File. Please read the documentation!The server will shut down automatically.
API Class Overview
public class NexaAPIMethods
String createGamepassTXN(Player player, String gamepassID)Create a purchase transaction.
Boolean checkIfUserOwnsGamepass(Player player, String gamepassId)Verify gamepass ownership.
Support
If you encounter issues:
- Verify your Game Token is configured correctly.
- Ensure the Nexa Developer API plugin is installed and enabled.
- Verify the Gamepass ID exists in your Nexa dashboard.
- Check server logs for startup validation errors.