Interface IPlayerConfigGroupAPI
- All Known Subinterfaces:
IPlayerConfigParentGroupAPI
-
Method Summary
Modifier and TypeMethodDescriptiongetId()Gets the ID of this group.booleanisDirectlyInGroup(IPlayerConfigAPI contextConfig, UUID playerId) Checks whether the player with a specified UUID is directly in this group in a specified context.booleanisDirectlyInGroup(IPlayerConfigAPI contextConfig, net.minecraft.server.level.ServerPlayer player) Checks whether a server player is directly in this group in a specified context.booleanisDirectlyInGroup(IPlayerConfigAPI contextConfig, net.minecraft.server.level.ServerPlayer player, UUID playerId) Checks whether the player with either a specified object or a UUID is directly in this group in a specified context.booleanisInGroup(IPlayerConfigAPI contextConfig, UUID playerId) Checks whether the player with a specified UUID is in this group in a specified context.booleanisInGroup(IPlayerConfigAPI contextConfig, net.minecraft.server.level.ServerPlayer player) Checks whether a server player is in this group in a specified context.booleanisInGroup(IPlayerConfigAPI contextConfig, net.minecraft.server.level.ServerPlayer player, UUID playerId) Checks whether the player with either a specified object or a UUID is in this group in a specified context.booleanChecks whether this player group supports a specified player config type.
-
Method Details
-
getId
Gets the ID of this group.- Returns:
- the ID of this group, not null
-
supportsConfigType
Checks whether this player group supports a specified player config type.For example, the built-in Party and Allies groups only support actual player configs, not global claim ones.
- Parameters:
type- the player config type, not null- Returns:
- true if this group supports the config type, otherwise false
-
isInGroup
boolean isInGroup(@Nonnull IPlayerConfigAPI contextConfig, @Nullable net.minecraft.server.level.ServerPlayer player, @Nullable UUID playerId) Checks whether the player with either a specified object or a UUID is in this group in a specified context.The context config is not necessarily where this group originates from. It's the config of the player whose groups are being checked, but there are groups that players inherit from outside their own config too, such as built-in groups (party, allies) and groups from the default player config.
At least one of the player identifiers (player, playerId) must be non-null.
- Parameters:
contextConfig- the context of the group check, not nullplayer- the player object to look up, must not be null if playerId is nullplayerId- the UUID of the player to look up, must not be null if player is null- Returns:
- true if the specified player is in the group, otherwise false
-
isInGroup
Checks whether the player with a specified UUID is in this group in a specified context.The context config is not necessarily where this group originates from. It's the config of the player whose groups are being checked, but there are groups that players inherit from outside their own config too, such as built-in groups (party, allies) and groups from the default player config.
- Parameters:
contextConfig- the context of the group check, not nullplayerId- the UUID of the player to look up, not null- Returns:
- true if the specified player is in the group, otherwise false
-
isInGroup
boolean isInGroup(@Nonnull IPlayerConfigAPI contextConfig, @Nonnull net.minecraft.server.level.ServerPlayer player) Checks whether a server player is in this group in a specified context.The context config is not necessarily where this group originates from. It's the config of the player whose groups are being checked, but there are groups that players inherit from outside their own config too, such as built-in groups (party, allies) and groups from the default player config.
- Parameters:
contextConfig- the context of the group check, not nullplayer- the player object to look up, not null- Returns:
- true if the specified player is in the group, otherwise false
-
isDirectlyInGroup
boolean isDirectlyInGroup(@Nonnull IPlayerConfigAPI contextConfig, @Nullable net.minecraft.server.level.ServerPlayer player, @Nullable UUID playerId) Checks whether the player with either a specified object or a UUID is directly in this group in a specified context.The context config is not necessarily where this group originates from. It's the config of the player whose groups are being checked, but there are groups that players inherit from outside their own config too, such as built-in groups (party, allies) and groups from the default player config.
At least one of the player identifiers (player, playerId) must be non-null.
- Parameters:
contextConfig- the context of the group check, not nullplayer- the player object to look up, must not be null if playerId is nullplayerId- the UUID of the player to look up, must not be null if player is null- Returns:
- true if the specified player is directly in the group, otherwise false
-
isDirectlyInGroup
Checks whether the player with a specified UUID is directly in this group in a specified context.The context config is not necessarily where this group originates from. It's the config of the player whose groups are being checked, but there are groups that players inherit from outside their own config too, such as built-in groups (party, allies) and groups from the default player config.
- Parameters:
contextConfig- the context of the group check, not nullplayerId- the UUID of the player to look up, not null- Returns:
- true if the specified player is directly in the group, otherwise false
-
isDirectlyInGroup
boolean isDirectlyInGroup(@Nonnull IPlayerConfigAPI contextConfig, @Nonnull net.minecraft.server.level.ServerPlayer player) Checks whether a server player is directly in this group in a specified context.The context config is not necessarily where this group originates from. It's the config of the player whose groups are being checked, but there are groups that players inherit from outside their own config too, such as built-in groups (party, allies) and groups from the default player config.
- Parameters:
contextConfig- the context of the group check, not nullplayer- the player object to look up, not null- Returns:
- true if the specified player is directly in the group, otherwise false
-