Interface IPartyAPI

All Known Subinterfaces:
IClientPartyAPI, IServerPartyAPI

public interface IPartyAPI
API for a party
  • Method Details

    • getMemberCount

      int getMemberCount()
      Gets the number of members in this party.
      Returns:
      the member count
    • getMemberInfo

      @Nullable IPartyMemberAPI getMemberInfo(@Nonnull UUID memberUUID)
      Gets info about the party member with a specified UUID.
      Parameters:
      memberUUID - the UUID of a party member, not null
      Returns:
      the member info, null if doesn't exist
    • getAllyCount

      int getAllyCount()
      Gets the number of parties allied by this one.
      Returns:
      the ally count
    • isAlly

      boolean isAlly(@Nonnull UUID partyId)
      Checks whether the party with a specified UUID is allied by this one.
      Parameters:
      partyId - the UUID of the party, not null
      Returns:
      true if the party is allied by this one, otherwise false
    • getInviteCount

      int getInviteCount()
      Gets the number of active invitation to this party.
      Returns:
      the invite count
    • isInvited

      boolean isInvited(@Nonnull UUID playerId)
      Checks whether the player with a specified UUID has an active invitation to this party.
      Parameters:
      playerId - the UUID of the player, not null
      Returns:
      true if there is a active invitation, otherwise false
    • getMemberInfoStream

      @Nonnull Stream<IPartyMemberAPI> getMemberInfoStream()
      Gets a stream of all member info for this party.
      Returns:
      a Stream of all member info, not null
    • getStaffInfoStream

      @Nonnull Stream<IPartyMemberAPI> getStaffInfoStream()
      Gets a stream of all member info for the staff members of this party.
      Returns:
      a Stream of all staff member info, not null
    • getNonStaffInfoStream

      @Nonnull Stream<IPartyMemberAPI> getNonStaffInfoStream()
      Gets a stream of all member info for the regular (non-staff) members of this party.
      Returns:
      a Stream of all regular member info, not null
    • getInvitedPlayersStream

      @Nonnull Stream<IPartyPlayerInfoAPI> getInvitedPlayersStream()
      Gets a stream of all active invitations for this party.
      Returns:
      a Stream of all active invitations, not null
    • getAllyPartiesStream

      @Nonnull Stream<IPartyAllyAPI> getAllyPartiesStream()
      Gets a stream of UUIDs of all parties allied by this party.
      Returns:
      a Stream of all allies, not null
    • getOwner

      @Nonnull IPartyMemberAPI getOwner()
      Gets the member info for the owner of this party.
      Returns:
      the party owner
    • getId

      @Nonnull UUID getId()
      Gets the UUID of this party.
      Returns:
      the UUID of this party, not null
    • getDefaultName

      @Nonnull String getDefaultName()
      Gets the default name of this party.
      Returns:
      the default name, not null
    • setRank

      boolean setRank(@Nonnull IPartyMemberAPI member, @Nonnull xaero.pac.common.parties.party.member.PartyMemberRank rank)
      Sets the rank of a specified party member.

      The member info needs to be from this party.

      Parameters:
      member - the party member, not null
      rank - the rank to set the party member to, not null
      Returns:
      true if the rank is successfully set, otherwise false