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 Type
    Method
    Description
    long
    Gets the timestamp when this party was created.
    @NotNull UUID
    Gets the UUID of the party leader.
    @NotNull Set<UUID>
    Gets all member UUIDs in this party (including the leader).
    @NotNull List<org.bukkit.entity.Player>
    Gets all online members of this party.
    @NotNull UUID
    Gets the unique ID of this party.
    int
    Gets the number of members in this party.
    boolean
    isLeader(@NotNull UUID playerId)
    Checks if a player is the leader of this party.
    boolean
    isMember(@NotNull UUID playerId)
    Checks if a player is a member of this party.
  • Method Details

    • getPartyId

      @NotNull @NotNull UUID getPartyId()
      Gets the unique ID of this party.
      Returns:
      The party's UUID
    • getLeaderId

      @NotNull @NotNull UUID getLeaderId()
      Gets the UUID of the party leader.
      Returns:
      The leader's UUID
    • getMembers

      @NotNull @NotNull Set<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

      boolean isLeader(@NotNull @NotNull UUID playerId)
      Checks if a player is the leader of this party.
      Parameters:
      playerId - The player's UUID
      Returns:
      true if the player is the leader
    • isMember

      boolean isMember(@NotNull @NotNull UUID playerId)
      Checks if a player is a member of this party.
      Parameters:
      playerId - The player's UUID
      Returns:
      true if the player is a member (including leader)
    • getOnlineMembers

      @NotNull @NotNull List<org.bukkit.entity.Player> getOnlineMembers()
      Gets all online members of this party.
      Returns:
      A list of online players in the party