Interface IPartyManagerAPI
public interface IPartyManagerAPI
API for the party manager on the server side
-
Method Summary
Modifier and TypeMethodDescriptioncreatePartyForOwner(net.minecraft.world.entity.player.Player owner) Creates a new party to be owned by a specified logged in player.Gets a stream of all parties.getPartiesThatAlly(UUID allyId) Gets a stream of all parties that ally a party with a specified UUID.getPartyById(UUID id) Gets the party of a specified UUID.getPartyByMember(UUID member) Gets the party from the UUID of a party member.getPartyByOwner(UUID owner) Gets the owned party from the UUID of a party's owner.booleanpartyExistsForOwner(UUID owner) Checks whether the player with a specified UUID owns a party.voidremoveParty(IServerPartyAPI party) Removes a specified party.voidremovePartyById(UUID id) Removes the party with a specified UUID.voidremovePartyByOwner(UUID owner) Removes the party owned by the player with a specified UUID.
-
Method Details
-
getPartyByOwner
Gets the owned party from the UUID of a party's owner.- Parameters:
owner- the player UUID of the party owner, not null- Returns:
- the party, null if doesn't exist
-
getPartyById
Gets the party of a specified UUID.- Parameters:
id- the party UUID, not null- Returns:
- the party, null if doesn't exist
-
getPartyByMember
Gets the party from the UUID of a party member.- Parameters:
member- the player UUID of the party member, not null- Returns:
- the party, null if doesn't exist
-
partyExistsForOwner
Checks whether the player with a specified UUID owns a party.- Parameters:
owner- the player UUID, not null- Returns:
- true if the player owns a party, otherwise false
-
createPartyForOwner
@Nullable IServerPartyAPI createPartyForOwner(@Nonnull net.minecraft.world.entity.player.Player owner) Creates a new party to be owned by a specified logged in player.- Parameters:
owner- the player to own the created party, not null- Returns:
- the created party, null if the player already owns a party, the parties feature is disabled or the party wasn't created for another reason
-
removePartyByOwner
Removes the party owned by the player with a specified UUID.- Parameters:
owner- the player UUID of the party owner, not null
-
removePartyById
Removes the party with a specified UUID.- Parameters:
id- the party UUID, not null
-
removeParty
Removes a specified party.- Parameters:
party- the party instance, not null
-
getAllStream
Gets a stream of all parties.- Returns:
- the stream of all parties, not null
-
getPartiesThatAlly
Gets a stream of all parties that ally a party with a specified UUID.- Parameters:
allyId- the ally party ID, not null- Returns:
- the stream of parties that ally the party, not null
-