Interface IPartyAPI
- All Known Subinterfaces:
IClientPartyAPI
,IServerPartyAPI
public interface IPartyAPI
API for a party
-
Method Summary
Modifier and TypeMethodDescriptionint
Gets the number of parties allied by this one.Gets a stream of UUIDs of all parties allied by this party.Gets the default name of this party.getId()
Gets the UUID of this party.int
Gets the number of active invitation to this party.Gets a stream of all active invitations for this party.int
Gets the number of members in this party.getMemberInfo
(UUID memberUUID) Gets info about the party member with a specified UUID.Gets a stream of all member info for this party.Gets a stream of all member info for the regular (non-staff) members of this party.getOwner()
Gets the member info for the owner of this party.Gets a stream of all member info for the staff members of this party.boolean
Checks whether the party with a specified UUID is allied by this one.boolean
Checks whether the player with a specified UUID has an active invitation to this party.boolean
setRank
(IPartyMemberAPI member, xaero.pac.common.parties.party.member.PartyMemberRank rank) Sets the rank of a specified party member.
-
Method Details
-
getMemberCount
int getMemberCount()Gets the number of members in this party.- Returns:
- the member count
-
getMemberInfo
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
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
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
Gets a stream of all member info for this party.- Returns:
- a
Stream
of all member info, not null
-
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
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
Gets a stream of all active invitations for this party.- Returns:
- a
Stream
of all active invitations, not null
-
getAllyPartiesStream
Gets a stream of UUIDs of all parties allied by this party.- Returns:
- a
Stream
of all allies, not null
-
getOwner
Gets the member info for the owner of this party.- Returns:
- the party owner
-
getId
Gets the UUID of this party.- Returns:
- the UUID of this party, not null
-
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 nullrank
- the rank to set the party member to, not null- Returns:
- true if the rank is successfully set, otherwise false
-