What is the ClansPlus API?
The ClansPlus API provides a comprehensive interface for developers to integrate with and extend ClansPlus functionality in their own plugins. It allows you to programmatically manage clans, players, and access all core features of the ClansPlus plugin.API Modules
The ClansPlus project is organized into three main modules:clansplus-api
The core API module containing all public interfaces and enums. This is what you’ll depend on in your projects. It includes:- Core interfaces (
ClanPlus,PluginDataManagerUtil,ClanManagerUtil) - Data storage interfaces (
IClanData,IPlayerData) - Enumerations (
Rank,Subject,SkillType,ItemType,DatabaseType,CurrencyType)
clansplus-implement
The implementation module that provides the concrete classes for the API interfaces. This is internal to ClansPlus and not directly accessed by developers.clansplus-plugin
The main plugin module that ties everything together and provides the Bukkit/Spigot plugin implementation.When to Use the API
You should use the ClansPlus API when you want to:- Create custom integrations with ClansPlus
- Build addons or extensions for ClansPlus
- Access clan data programmatically
- Manage players and clans from your own plugin
- Hook into ClansPlus features for custom functionality
- Create custom clan management tools
- Integrate ClansPlus with other plugins
Key Interfaces
ClanPlus
The main entry point for the API. Provides access to:PluginDataManagerUtil- Manages all clan and player dataClanManagerUtil- Provides clan management utilities
PluginDataManagerUtil
Handles all database operations for clans and players:- Load and save clan/player data
- Access clan and player databases
- Transfer data between database types
- Clear and delete data
ClanManagerUtil
Provides utility methods for clan operations:- Check if clans/players exist
- Send alerts to clan members
- Add players to clans
- Get clan statistics and rankings
- Format clan names and messages
- Manage clan storage and chat
IClanData
Represents a clan’s data with methods to get/set:- Basic info (name, custom name, owner, message)
- Statistics (score, war points, warnings)
- Members and allies
- Spawn points and icons
- Skill levels and permissions
- Discord integration
- Storage inventories
IPlayerData
Represents a player’s clan-related data:- Player identification (name, UUID)
- Clan membership
- Rank within clan (
LEADER,MANAGER,MEMBER) - Join date and activity tracking
- Score contributions
Core Enumerations
Rank
Defines player ranks within a clan:LEADER- Clan owner with full permissionsMANAGER- Elevated member with additional permissionsMEMBER- Standard clan member
Subject
Defines permission subjects for clan activities:INVITE,KICK- Member managementSETCUSTOMNAME,SETICON,SETMESSAGE- Clan customizationSPAWN,SETSPAWN- Spawn managementSETMANAGER,REMOVEMANAGER- Rank managementCHAT- Clan chat accessUPGRADE- Clan upgradesMANAGEALLY- Alliance managementOPENSTORAGE- Storage access
Next Steps
Setup Guide
Learn how to add ClansPlus API to your project
Examples
See practical examples of using the API
