Package com.tomkeuper.bedwars.api.party
Interface Party
public interface Party
The Party interface represents a party system for players.
Implementations of this interface provide methods for managing parties and their members.
-
Method Summary
Modifier and TypeMethodDescriptionvoid
addMember
(org.bukkit.entity.Player owner, org.bukkit.entity.Player member) Adds a member to the party.void
createParty
(org.bukkit.entity.Player owner, org.bukkit.entity.Player... members) Creates a new party with the specified owner and members.void
disband
(org.bukkit.entity.Player owner) Disbands the party, removing all members and deleting the party.List
<org.bukkit.entity.Player> getMembers
(org.bukkit.entity.Player owner) Retrieves a list of all members in the party.default org.bukkit.entity.Player
getOwner
(org.bukkit.entity.Player member) Retrieves the owner/leader of the party that the specified member belongs to.boolean
hasParty
(org.bukkit.entity.Player player) Checks if a player has a party.boolean
Checks if the party implementation is internal or external.boolean
isMember
(org.bukkit.entity.Player owner, org.bukkit.entity.Player check) Checks if a player is a member of a specific party.boolean
isOwner
(org.bukkit.entity.Player player) Checks if the player is the owner/leader of the party.int
partySize
(org.bukkit.entity.Player player) Retrieves the size of the party that the player belongs to.default void
promote
(@NotNull org.bukkit.entity.Player owner, @NotNull org.bukkit.entity.Player target) Promotes a player to the owner/leader of the party (Not implemented).void
removeFromParty
(org.bukkit.entity.Player member) Removes a member from the party.void
removePlayer
(org.bukkit.entity.Player owner, org.bukkit.entity.Player target) Removes a player from the party.
-
Method Details
-
hasParty
boolean hasParty(org.bukkit.entity.Player player) Checks if a player has a party.- Parameters:
player
- The player to check.- Returns:
true
if the player has a party,false
otherwise.
-
partySize
int partySize(org.bukkit.entity.Player player) Retrieves the size of the party that the player belongs to.- Parameters:
player
- The player.- Returns:
- The size of the party that the player belongs to.
-
isOwner
boolean isOwner(org.bukkit.entity.Player player) Checks if the player is the owner/leader of the party.- Parameters:
player
- The player to check.- Returns:
true
if the player is the owner/leader of the party,false
otherwise.
-
getMembers
Retrieves a list of all members in the party.- Parameters:
owner
- The owner/leader of the party.- Returns:
- A list of all members in the party.
-
createParty
void createParty(org.bukkit.entity.Player owner, org.bukkit.entity.Player... members) Creates a new party with the specified owner and members.- Parameters:
owner
- The owner/leader of the party.members
- Additional members to add to the party.
-
addMember
void addMember(org.bukkit.entity.Player owner, org.bukkit.entity.Player member) Adds a member to the party.- Parameters:
owner
- The owner/leader of the party.member
- The member to add to the party.
-
removeFromParty
void removeFromParty(org.bukkit.entity.Player member) Removes a member from the party.- Parameters:
member
- The member to remove from the party.
-
disband
void disband(org.bukkit.entity.Player owner) Disbands the party, removing all members and deleting the party.- Parameters:
owner
- The owner/leader of the party.
-
isMember
boolean isMember(org.bukkit.entity.Player owner, org.bukkit.entity.Player check) Checks if a player is a member of a specific party.- Parameters:
owner
- The owner/leader of the party.check
- The player to check.- Returns:
true
if the player is a member of the party,false
otherwise.
-
removePlayer
void removePlayer(org.bukkit.entity.Player owner, org.bukkit.entity.Player target) Removes a player from the party.- Parameters:
owner
- The owner/leader of the party.target
- The player to remove.
-
getOwner
default org.bukkit.entity.Player getOwner(org.bukkit.entity.Player member) Retrieves the owner/leader of the party that the specified member belongs to.- Parameters:
member
- The member of the party.- Returns:
- The owner/leader of the party.
-
promote
default void promote(@NotNull @NotNull org.bukkit.entity.Player owner, @NotNull @NotNull org.bukkit.entity.Player target) Promotes a player to the owner/leader of the party (Not implemented). Sends a message to the owner and target players indicating that this feature is not implemented.- Parameters:
owner
- The current owner/leader of the party.target
- The player to promote.
-
isInternal
boolean isInternal()Checks if the party implementation is internal or external.- Returns:
true
if the party implementation is internal,false
otherwise.
-