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 TypeMethodDescriptiongetPartyByMember
(UUID playerId) Gets the party that the player with a specified UUID is a part of.getPartyByOwner
(UUID playerId) Gets the party that the player with a specified UUID owns.boolean
isPermittedToPartyClaim
(UUID playerId) 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 UUIDplayerId
considers a player with UUIDpotentialAllyPlayerId
an ally.
-
Method Details
-
getPartyByOwner
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
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
Checks if a player with UUIDplayerId
considers a player with UUIDpotentialAllyPlayerId
an ally.- Parameters:
playerId
- the UUID of the player to check the allies of, not nullpotentialAllyPlayerId
- the UUID of the player to check the ally status of, not null- Returns:
- true, if
playerId
considerspotentialAllyPlayerId
an ally, otherwise false
-
isPermittedToPartyClaim
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
-