Package dev.itsharshxd.zentrix.api.party
Interface ZentrixParty
public interface ZentrixParty
Represents a player party in Zentrix.
Parties are pre-game groups that allow players to queue and join games together. Each party has a leader who can invite/kick members.
Example Usage
PartyService partyService = ZentrixAPI.get().getPartyService();
Optional<ZentrixParty> party = partyService.getParty(player);
party.ifPresent(p -> {
UUID leaderId = p.getLeaderId();
int size = p.getSize();
Set<UUID> members = p.getMembers();
});
- Since:
- 1.2.0
-
Method Summary
Modifier and TypeMethodDescriptionlongGets the timestamp when this party was created.@NotNull UUIDGets the UUID of the party leader.Gets all member UUIDs in this party (including the leader).@NotNull List<org.bukkit.entity.Player> Gets all online members of this party.@NotNull UUIDGets the unique ID of this party.intgetSize()Gets the number of members in this party.booleanChecks if a player is the leader of this party.booleanChecks if a player is a member of this party.
-
Method Details
-
getPartyId
Gets the unique ID of this party.- Returns:
- The party's UUID
-
getLeaderId
Gets the UUID of the party leader.- Returns:
- The leader's UUID
-
getMembers
Gets all member UUIDs in this party (including the leader).- Returns:
- An unmodifiable set of member UUIDs
-
getSize
int getSize()Gets the number of members in this party.- Returns:
- The party size
-
getCreatedAt
long getCreatedAt()Gets the timestamp when this party was created.- Returns:
- Creation time in milliseconds since epoch
-
isLeader
Checks if a player is the leader of this party.- Parameters:
playerId- The player's UUID- Returns:
trueif the player is the leader
-
isMember
Checks if a player is a member of this party.- Parameters:
playerId- The player's UUID- Returns:
trueif the player is a member (including leader)
-
getOnlineMembers
Gets all online members of this party.- Returns:
- A list of online players in the party
-