Skip to content

Team Providers

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

Team Providers API

BeaconPlus allows you to integrate with custom team or party plugins by implementing a TeamProvider. This is useful for allowing entire teams to be added to a beacon's whitelist or blacklist.

1. Create the Team Implementation

First, implement the Team interface to represent a group from your plugin.

import thito.beaconplus.team.Team;
import org.bukkit.entity.Player;

public class MyTeam implements Team {
    private final String id;
    private final String name;

    public MyTeam(String id, String name) {
        this.id = id;
        this.name = name;
    }

    @Override
    public String getId() { return id; }

    @Override
    public String getName() { return name; }

    @Override
    public boolean isMember(Player player) {
        // Check if the player is in this team
        return false; 
    }
}

2. Create the TeamProvider Implementation

The TeamProvider handles lookup and player-to-team mapping.

import thito.beaconplus.team.TeamProvider;
import thito.beaconplus.team.Team;
import org.bukkit.entity.Player;

public class MyTeamProvider implements TeamProvider {

    @Override
    public String getId() { return "MY_PLUGIN"; }

    @Override
    public String getDisplayName() { return "My Plugin Teams"; }

    @Override
    public boolean isAvailable() {
        // Check if your plugin is enabled
        return true;
    }

    @Override
    public Team getTeamByName(String name) {
        // Find team by name/ID
        return null;
    }

    @Override
    public Team getPlayerTeam(Player player) {
        // Get the team the player is currently in
        return null;
    }

    @Override
    public boolean requiresSync() {
        // Return true if your plugin's API is NOT thread-safe
        return false;
    }
}

3. Register the Provider

Register your provider with the BeaconAPI.

import thito.beaconplus.BeaconAPI;

public void onEnable() {
    BeaconAPI.getAPI().registerTeamProvider(new MyTeamProvider());
}

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