Skip to main content

Overview

The IClanData interface provides methods to access and modify clan information, including membership, permissions, skills, storage, and Discord integration.

Interface Methods

Basic Information

getName()
String
Returns the clan’s internal name identifier.
setName(String name)
void
Sets the clan’s internal name identifier.Parameters:
  • name - The clan’s internal name
getCustomName()
String
Returns the clan’s custom display name with formatting.
setCustomName(String customName)
void
Sets the clan’s custom display name.Parameters:
  • customName - The formatted display name
getOwner()
String
Returns the UUID or username of the clan owner.
setOwner(String owner)
void
Sets the clan owner.Parameters:
  • owner - The owner’s identifier
getMessage()
String
Returns the clan’s message or description.
setMessage(String message)
void
Sets the clan’s message.Parameters:
  • message - The clan message

Scoring and Points

getScore()
int
Returns the clan’s current score.
setScore(int score)
void
Sets the clan’s score.Parameters:
  • score - The score value
getWarPoint()
long
Returns the clan’s war points.
setWarPoint(long warPoint)
void
Sets the clan’s war points.Parameters:
  • warPoint - The war point value
getWarning()
int
Returns the number of warnings the clan has received.
setWarning(int warning)
void
Sets the clan’s warning count.Parameters:
  • warning - The warning count

Membership

getMembers()
List<String>
Returns a list of all clan member identifiers.
setMembers(List<String> members)
void
Sets the clan’s member list.Parameters:
  • members - List of member identifiers
getMaxMembers()
int
Returns the maximum number of members allowed in the clan.
setMaxMembers(int maxMembers)
void
Sets the maximum member limit.Parameters:
  • maxMembers - The maximum number of members

Metadata

getCreatedDate()
long
Returns the clan creation timestamp in milliseconds.
setCreatedDate(long createdDate)
void
Sets the clan creation timestamp.Parameters:
  • createdDate - Unix timestamp in milliseconds

Icon Configuration

getIconType()
ItemType
Returns the type of icon used for the clan (MATERIAL, CUSTOMHEAD, or PLAYERHEAD).
setIconType(ItemType itemType)
void
Sets the clan icon type.Parameters:
  • itemType - The icon type from ItemType enum
getIconValue()
String
Returns the value/identifier for the clan icon.
setIconValue(String iconValue)
void
Sets the clan icon value.Parameters:
  • iconValue - Material name, head texture, or player name

Location

getSpawnPoint()
Location
Returns the clan’s spawn point location.
setSpawnPoint(Location spawnPoint)
void
Sets the clan spawn point.Parameters:
  • spawnPoint - Bukkit Location object

Alliances

getAllies()
List<String>
Returns a list of allied clan names.
setAllies(List<String> allies)
void
Sets the clan’s ally list.Parameters:
  • allies - List of allied clan names
getAllyInvitation()
List<String>
Returns a list of pending ally invitations.
setAllyInvitation(List<String> allyInvitation)
void
Sets the pending ally invitation list.Parameters:
  • allyInvitation - List of clan names with pending invitations

Skills and Permissions

getSkillLevel()
HashMap<Integer, Integer>
Returns a map of skill IDs to their levels.
setSkillLevel(HashMap<Integer, Integer> skillLevel)
void
Sets the clan’s skill levels.Parameters:
  • skillLevel - Map of skill ID to level
getSubjectPermission()
HashMap<Subject, Rank>
Returns a map of permissions (subjects) to the minimum rank required.
setSubjectPermission(HashMap<Subject, Rank> subjectPermission)
void
Sets the clan’s permission configuration.Parameters:
  • subjectPermission - Map of Subject to Rank

Discord Integration

getDiscordChannelID()
long
Returns the linked Discord channel ID.
setDiscordChannelID(long discordChannelID)
void
Sets the Discord channel ID.Parameters:
  • discordChannelID - Discord channel ID
Returns the Discord server invite link.
Sets the Discord invite link.Parameters:
  • discordJoinLink - Discord invite URL

Storage

getStorageHashMap()
HashMap<Integer, Inventory>
Returns a map of storage page numbers to Bukkit Inventory objects.
setStorageHashMap(HashMap<Integer, Inventory> inventory)
void
Sets the clan’s storage inventories.Parameters:
  • inventory - Map of page number to Inventory
getMaxStorage()
int
Returns the maximum number of storage pages available.
setMaxStorage(int maxStorage)
void
Sets the maximum storage pages.Parameters:
  • maxStorage - Maximum number of storage pages

Usage Example

import com.cortezromeo.clansplus.api.storage.IClanData;
import com.cortezromeo.clansplus.api.enums.Rank;
import com.cortezromeo.clansplus.api.enums.Subject;

// Get clan data from API
IClanData clanData = clansPlusAPI.getClanData("MyClan");

// Access basic information
String clanName = clanData.getName();
String displayName = clanData.getCustomName();
int score = clanData.getScore();

// Modify clan properties
clanData.setMessage("Welcome to our clan!");
clanData.setMaxMembers(50);

// Check permissions
HashMap<Subject, Rank> permissions = clanData.getSubjectPermission();
Rank requiredRank = permissions.get(Subject.INVITE);

// Manage members
List<String> members = clanData.getMembers();
System.out.println("Current members: " + members.size() + "/" + clanData.getMaxMembers());

See Also

Build docs developers (and LLMs) love