Interface IPartyManagerAPI


public interface IPartyManagerAPI
API for the party manager on the server side
  • Method Details

    • getPartyByOwner

      @Nullable IServerPartyAPI getPartyByOwner(@Nonnull UUID owner)
      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

      @Nullable IServerPartyAPI getPartyById(@Nonnull UUID id)
      Gets the party of a specified UUID.
      Parameters:
      id - the party UUID, not null
      Returns:
      the party, null if doesn't exist
    • getPartyByMember

      @Nullable IServerPartyAPI getPartyByMember(@Nonnull UUID member)
      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

      boolean partyExistsForOwner(@Nonnull UUID owner)
      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

      void removePartyByOwner(@Nonnull UUID owner)
      Removes the party owned by the player with a specified UUID.
      Parameters:
      owner - the player UUID of the party owner, not null
    • removePartyById

      void removePartyById(@Nonnull UUID id)
      Removes the party with a specified UUID.
      Parameters:
      id - the party UUID, not null
    • removeParty

      void removeParty(@Nonnull IServerPartyAPI party)
      Removes a specified party.
      Parameters:
      party - the party instance, not null
    • getAllStream

      @Nonnull Stream<IServerPartyAPI> getAllStream()
      Gets a stream of all parties.
      Returns:
      the stream of all parties, not null
    • getPartiesThatAlly

      @Nonnull Stream<IServerPartyAPI> getPartiesThatAlly(@Nonnull UUID allyId)
      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