TeamsAPI is a universal, timeless bridge plugin for Minecraft servers. Inspired by Vault, it defines a clean, stable interface for team operations so any plugin that needs team data can work with any compatible team plugin — without coupling them together.
Your Plugin (consumer) → TeamsAPI (bridge) → Team Plugin (provider)
- Providers (e.g. faction, clan, guild plugins) implement
TeamsServiceand register with TeamsAPI duringonEnable(). - Consumers (any plugin that needs team data) call
TeamsAPI.getService()and use the returnedTeamsService— without knowing which team plugin is installed. - Server owners install
TeamsAPI.jaralongside any single compatible team plugin.
GitHub Releases | Modrinth | Hangar
Maven (via Jitpack):
<repositories>
<repository>
<id>jitpack.io</id>
<url>https://jitpack.io</url>
</repository>
</repositories>
<dependency>
<groupId>com.github.ez-plugins</groupId>
<artifactId>teams-api</artifactId>
<version>1.1.0</version>
<scope>provided</scope>
</dependency>Gradle:
repositories {
maven { url 'https://jitpack.io' }
}
dependencies {
compileOnly 'com.github.ez-plugins:teams-api:1.1.0'
}// In onEnable() or lazily:
if (!TeamsAPI.isAvailable()) {
getLogger().warning("No team plugin found — team features disabled.");
return;
}
// Anywhere team data is needed:
TeamsService teams = TeamsAPI.getService();
Optional<Team> team = teams.getPlayerTeam(player.getUniqueId());
team.ifPresent(t -> player.sendMessage("Team: " + t.getDisplayName()));private MyTeamsService teamsService;
@Override
public void onEnable() {
teamsService = new MyTeamsService(this);
TeamsAPI.registerProvider(this, teamsService);
}
@Override
public void onDisable() {
TeamsAPI.unregisterProvider(teamsService);
}If the active team plugin also supports invitations, a TeamsInviteService is available:
if (TeamsAPI.isInviteAvailable()) {
TeamsInviteService invites = TeamsAPI.getInviteService();
invites.invitePlayer(teamId, sender.getUniqueId(), target.getUniqueId());
}Providers that support invitations register the service alongside TeamsService:
@Override
public void onEnable() {
TeamsAPI.registerProvider(this, teamsService);
TeamsAPI.registerInviteProvider(this, inviteService);
}
@Override
public void onDisable() {
TeamsAPI.unregisterProvider(teamsService);
TeamsAPI.unregisterInviteProvider(inviteService);
}Provider events extend TeamEvent. Core events are cancellable; invite result events are informational:
@EventHandler
public void onTeamJoin(TeamJoinEvent event) {
if (event.getTeam().getSize() >= 10) {
event.setCancelled(true);
}
}
@EventHandler
public void onInviteAccepted(TeamInviteAcceptEvent event) {
// player has already joined — informational only
}For the complete API reference, see docs/api.md.
For integration examples, see docs/developer-guide.md.
- Java: 21+
- Server software: Bukkit, Paper, Spigot, Purpur
- Plugin API baseline: 1.21+
# Compile
mvn -q -DskipTests compile
# Run tests
mvn -q -pl teams-api test
# Build server JAR
mvn -q -DskipTests packageBuild requirements: Java 21+, Maven 3.8+.
| Module | Description |
|---|---|
teams-api/ |
Public API — interfaces, models, and events. Depend on this. |
teams-api-plugin/ |
Bukkit plugin packaging. Server owners install this JAR. |
mvn -q -DskipTests compile— must succeed.mvn -q -pl teams-api test— all tests must pass.mvn -q -pl teams-api checkstyle:check— zero violations.- Add tests for non-trivial logic changes.
- Update Javadoc whenever a public API changes.
See AGENTS.md for full coding standards.
MIT — see LICENSE.