Interface IPlayerConfigGroupAPI

All Known Subinterfaces:
IPlayerConfigParentGroupAPI

public interface IPlayerConfigGroupAPI
API for a player group
  • Method Summary

    Modifier and Type
    Method
    Description
    Gets the ID of this group.
    boolean
    isDirectlyInGroup(IPlayerConfigAPI contextConfig, UUID playerId)
    Checks whether the player with a specified UUID is directly in this group in a specified context.
    boolean
    isDirectlyInGroup(IPlayerConfigAPI contextConfig, net.minecraft.server.level.ServerPlayer player)
    Checks whether a server player is directly in this group in a specified context.
    boolean
    isDirectlyInGroup(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.
    boolean
    isInGroup(IPlayerConfigAPI contextConfig, UUID playerId)
    Checks whether the player with a specified UUID is in this group in a specified context.
    boolean
    isInGroup(IPlayerConfigAPI contextConfig, net.minecraft.server.level.ServerPlayer player)
    Checks whether a server player is in this group in a specified context.
    boolean
    isInGroup(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.
    boolean
    Checks whether this player group supports a specified player config type.
  • Method Details

    • getId

      @Nonnull String getId()
      Gets the ID of this group.
      Returns:
      the ID of this group, not null
    • supportsConfigType

      boolean supportsConfigType(@Nonnull PlayerConfigType type)
      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 null
      player - the player object to look up, must not be null if playerId is null
      playerId - 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

      boolean isInGroup(@Nonnull IPlayerConfigAPI contextConfig, @Nonnull UUID playerId)
      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 null
      playerId - 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 null
      player - 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 null
      player - the player object to look up, must not be null if playerId is null
      playerId - 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

      boolean isDirectlyInGroup(@Nonnull IPlayerConfigAPI contextConfig, @Nonnull UUID playerId)
      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 null
      playerId - 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 null
      player - the player object to look up, not null
      Returns:
      true if the specified player is directly in the group, otherwise false