Package dev.drawethree.xprison.api.gangs
Interface XPrisonGangsAPI
public interface XPrisonGangsAPI
API for interacting with the Gangs system in the XPrison plugin.
Provides methods to retrieve, create, disband, and validate gangs, as well as access gang membership information.
-
Method Summary
Modifier and TypeMethodDescriptioncheckGangName
(String name) Checks whether a given gang name is valid and can be used.createGang
(String name, org.bukkit.entity.Player gangLeader) Attempts to create a new gang with the specified name and leader.void
disbandGang
(Gang gang) Disbands the specified gang if it exists.Returns a collection of all registered gangs.Retrieves a gang by its name, if it exists.getPlayerGang
(org.bukkit.OfflinePlayer player) Retrieves the gang associated with the specified player, if any.
-
Method Details
-
getPlayerGang
Retrieves the gang associated with the specified player, if any. -
getByName
Retrieves a gang by its name, if it exists. -
getAllGangs
Collection<Gang> getAllGangs()Returns a collection of all registered gangs.- Returns:
- a
Collection
of allGang
s
-
createGang
Attempts to create a new gang with the specified name and leader.- Parameters:
name
- the desired name of the ganggangLeader
- thePlayer
who will become the leader of the gang- Returns:
- a
GangCreateResult
indicating the result of the creation attempt
-
disbandGang
Disbands the specified gang if it exists. All gang members will be removed and the gang will be deleted.- Parameters:
gang
- theGang
to disband
-
checkGangName
Checks whether a given gang name is valid and can be used.- Parameters:
name
- the proposed gang name- Returns:
- a
GangNameCheckResult
indicating if the name is valid or why it is not
-