Interface IPlayerPartySystemAPI<P>

Type Parameters:
P - the type of parties in the implemented system

public interface IPlayerPartySystemAPI<P>
The interface to be overridden by addons that wish to implement additional party systems to be used by Open Parties and Claims (just the claiming feature as of writing this).

Player position synchronization is a part of the default party system. Similar functionality should be implemented in other party systems and supported separately by the map mods that display party members. OPAC does not synchronize or provide party member/ally positions from other party systems, even if they're implemented using this interface.

Party system implementations must be registered in IPlayerPartySystemRegisterAPI.

  • Method Summary

    Modifier and Type
    Method
    Description
    Gets the party that the player with a specified UUID is a part of.
    Gets the party that the player with a specified UUID owns.
    boolean
    Checks if a player is permitted to claim as the party that they belong to but don't own.
    boolean
    isPlayerAllying(UUID playerId, UUID potentialAllyPlayerId)
    Checks if a player with UUID playerId considers a player with UUID potentialAllyPlayerId an ally.
  • Method Details

    • getPartyByOwner

      @Nullable P getPartyByOwner(@Nonnull UUID playerId)
      Gets the party that the player with a specified UUID owns.
      Parameters:
      playerId - the UUID of the player, not null
      Returns:
      the party that the player owns, null if the player doesn't own one
    • getPartyByMember

      @Nullable P getPartyByMember(@Nonnull UUID playerId)
      Gets the party that the player with a specified UUID is a part of.
      Parameters:
      playerId - the UUID of the player, not null
      Returns:
      the party that the player is in, null if the player isn't in one
    • isPlayerAllying

      boolean isPlayerAllying(@Nonnull UUID playerId, @Nonnull UUID potentialAllyPlayerId)
      Checks if a player with UUID playerId considers a player with UUID potentialAllyPlayerId an ally.
      Parameters:
      playerId - the UUID of the player to check the allies of, not null
      potentialAllyPlayerId - the UUID of the player to check the ally status of, not null
      Returns:
      true, if playerId considers potentialAllyPlayerId an ally, otherwise false
    • isPermittedToPartyClaim

      boolean isPermittedToPartyClaim(@Nonnull UUID playerId)
      Checks if a player is permitted to claim as the party that they belong to but don't own.

      This is not used by Open Parties and Claims as of writing this.

      Parameters:
      playerId - the UUID of the player, not null
      Returns:
      true, if the player is permitted to claim as the party, otherwise false