Interface IPlayerPartySystemAPI<P>
- Type Parameters:
P- the type of parties in the implemented system
- All Known Subinterfaces:
IPlayerPartySystemAPI<P>
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 TypeMethodDescriptionbooleancanCreatePartyConfigGroups(UUID playerId) Checks if a player is permitted to create player groups in the party's claims config (the party owner's config).booleancanEditPartyConfig(UUID playerId) Checks if a player is permitted to edit the party's claims config (the party owner's config).booleancanIncludeGroupsInPartyConfigGroups(UUID playerId) Checks if a player is permitted to include/exclude player groups in other player groups in the party's claims config (the party owner's config).booleancanIncludePlayersInPartyConfigGroups(UUID playerId) Checks if a player is permitted to include/exclude players in player groups in the party's claims config (the party owner's config).default intGets the RGB color (no alpha channel) of a specified party, e.g.intgetMemberCount(P party) Gets the member count of a specified party.net.minecraft.network.chat.ComponentGets the display name of a specified party.Gets the UUID of the owner of a specified party.getPartyByMember(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.booleanisPermittedToPartyClaim(UUID playerId) Checks if a player is permitted to claim as the party that they belong to but don't own.booleanisPlayerAllying(UUID playerId, UUID potentialAllyPlayerId) Checks if a player with UUIDplayerIdconsiders a player with UUIDpotentialAllyPlayerIdan 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 UUIDplayerIdconsiders a player with UUIDpotentialAllyPlayerIdan 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
playerIdconsiderspotentialAllyPlayerIdan 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
-
canEditPartyConfig
Checks if a player is permitted to edit the party's claims config (the party owner's config).- Parameters:
playerId- the UUID of the player, not null- Returns:
- true, if the player is permitted to edit the party's claims config, otherwise false
-
canCreatePartyConfigGroups
Checks if a player is permitted to create player groups in the party's claims config (the party owner's config).- Parameters:
playerId- the UUID of the player, not null- Returns:
- true, if the player is permitted to create player groups, otherwise false
-
canIncludeGroupsInPartyConfigGroups
Checks if a player is permitted to include/exclude player groups in other player groups in the party's claims config (the party owner's config).- Parameters:
playerId- the UUID of the player, not null- Returns:
- true, if the player is permitted to include/exclude player groups in other player groups, otherwise false
-
canIncludePlayersInPartyConfigGroups
Checks if a player is permitted to include/exclude players in player groups in the party's claims config (the party owner's config).- Parameters:
playerId- the UUID of the player, not null- Returns:
- true, if the player is permitted to include/exclude player groups in other player groups, otherwise false
-
getOwner
Gets the UUID of the owner of a specified party.- Parameters:
party- the party the owner of which will be returned, not null- Returns:
- the UUID of the party owner, null if the party has no owner (things won't work!)
-
getName
Gets the display name of a specified party.- Parameters:
party- the party the display name of which will be returned, not null- Returns:
- the party display name as a Component, null if the party doesn't have one
-
getMemberCount
Gets the member count of a specified party.- Parameters:
party- the party the member count of which will be returned, not null- Returns:
- the member count of the party
-
getColor
Gets the RGB color (no alpha channel) of a specified party, e.g. 0x00FFFFFF for white. Party systems that don't support party colors should not override this.- Parameters:
party- the party, not null- Returns:
- the color assigned to the party, -1 if this party system doesn't support colors
-