Skip to content

API Basics

github-actions[bot] edited this page Jan 3, 2026 · 5 revisions

API Basics

BeaconPlus provides a robust API for developers to interact with beacons, players, and effects.

Accessing the API

The main entry point for the API is the BeaconAPI class. You can access it using the static getAPI() method:

import thito.beaconplus.BeaconAPI;

BeaconAPI api = BeaconAPI.getAPI();

Maven/Gradle Dependency

Since there is currently no public repository, you should include the BeaconPlus.jar file as a local dependency in your project.

Maven

<dependency>
    <groupId>thito</groupId>
    <artifactId>BeaconPlus</artifactId>
    <version>3.1.12</version> <!-- Use the version from plugin.yml -->
    <scope>provided</scope>
    <systemPath>${project.basedir}/libs/BeaconPlus.jar</systemPath>
</dependency>

Gradle

dependencies {
    compileOnly files('libs/BeaconPlus.jar')
}

Common Tasks

Getting Beacon Data

To retrieve information about a beacon at a specific location:

Location loc = ...;
BeaconData data = api.getBeaconData(loc);
if (data != null) {
    String name = data.getBeaconName();
    double range = data.getRange();
    // ...
}

Getting Player Data

To get data associated with a player (e.g., their placed beacons):

Player player = ...;
PlayerData data = api.getPlayerData(player);
if (data != null) {
    List<BeaconInfo> beacons = data.getBeaconInfoList();
    // ...
}

Submitting Tasks

BeaconPlus uses its own internal executor for many operations. You can submit tasks to it:

api.submit(() -> {
    // Perform asynchronous operation
});

Next Steps

Server Owner Reference

Installation
Commands & Permissions
Config.yml
Beacon.yml
GUI Reference
All Beacon Effects
All Conditions & Filters
Effect File Structure
Storage Reference

Tutorials

VIP-Only Effects
Custom Recipes
Multi-Tier Economy
MySQL Setup

Player Guide

Getting Started
Managing Beacons
Upgrading Effects
Access Control

Developer Documentation

API Basics
Custom Effects
Team Providers

Clone this wiki locally