Interface Gang
public interface Gang
Represents a Gang in the XPrison plugin.
Provides methods to access gang data, members, invitations, and gang-related actions.
-
Method Summary
Modifier and TypeMethodDescriptionCollection<org.bukkit.OfflinePlayer>
Retrieves all members of the gang, including offline players.long
Gets the current value of the gang.getName()
Gets the name of the gang.Collection<org.bukkit.entity.Player>
Retrieves a collection of all online members currently in the gang.org.bukkit.OfflinePlayer
Gets the gang leader as anOfflinePlayer
.Retrieves a collection of all pending invitations to this gang.invitePlayer
(org.bukkit.OfflinePlayer player) Invites a player to join this gang.boolean
isInGang
(org.bukkit.OfflinePlayer player) Checks whether the given player is a member of this gang.boolean
isOwner
(org.bukkit.OfflinePlayer player) Checks whether the given player is the leader of this gang.void
removeInvite
(GangInvitation invitation) Removes a pending invitation from this gang.
-
Method Details
-
getOwnerOffline
org.bukkit.OfflinePlayer getOwnerOffline()Gets the gang leader as anOfflinePlayer
.- Returns:
- the gang leader
-
getName
String getName()Gets the name of the gang.- Returns:
- the gang name
-
isOwner
boolean isOwner(org.bukkit.OfflinePlayer player) Checks whether the given player is the leader of this gang.- Parameters:
player
- the player to check- Returns:
true
if the player is the gang leader,false
otherwise
-
isInGang
boolean isInGang(org.bukkit.OfflinePlayer player) Checks whether the given player is a member of this gang.- Parameters:
player
- the player to check- Returns:
true
if the player is in the gang,false
otherwise
-
getPendingInvites
Collection<GangInvitation> getPendingInvites()Retrieves a collection of all pending invitations to this gang.- Returns:
- a collection of pending
GangInvitation
s
-
getGangValue
long getGangValue()Gets the current value of the gang. This could represent a score, worth, or ranking metric.- Returns:
- the numerical value of the gang
-
getOnlineMembers
Collection<org.bukkit.entity.Player> getOnlineMembers()Retrieves a collection of all online members currently in the gang.- Returns:
- a collection of online
Player
s in the gang
-
getAllMembers
Collection<org.bukkit.OfflinePlayer> getAllMembers()Retrieves all members of the gang, including offline players.- Returns:
- a collection of all
OfflinePlayer
s in the gang
-
invitePlayer
Invites a player to join this gang. The invitation must be accepted before the player becomes a member.- Parameters:
player
- the player to invite- Returns:
- the created
GangInvitation
-
removeInvite
Removes a pending invitation from this gang. If the invitation has already been accepted or expired, this may have no effect.- Parameters:
invitation
- theGangInvitation
to remove
-