Class LimitsFile

java.lang.Object
me.tayebyassine.homestead.resources.ResourceFile
me.tayebyassine.homestead.resources.files.LimitsFile

public final class LimitsFile extends ResourceFile
Typed accessor for limits.yml.
  • Constructor Details

  • Method Details

    • getLimitsMethod

      public String getLimitsMethod()
      The limit resolution method used by the plugin.

      Valid values are "static", "groups", or "permissions".

      Returns:
      the method name, defaults to "static"
    • getPlayerLimit

      public Object getPlayerLimit(String playerName, String limitKey)
      A player-specific limit override, or null if the player has no override for this limit.
      Parameters:
      playerName - the player name
      limitKey - the limit config key (e.g. "regions")
      Returns:
      the override value, or null
    • getStaticLimit

      public Object getStaticLimit(boolean isOp, String limitKey)
      A static limit value for op or non-op players.
      Parameters:
      isOp - whether the player is a server operator
      limitKey - the limit config key
      Returns:
      the static limit, or null if not set
    • getGroupLimit

      public Object getGroupLimit(String group, String limitKey)
      A group-based limit value.
      Parameters:
      group - the permission group name
      limitKey - the limit config key
      Returns:
      the group limit, or null if not set
    • getPermissionsPriority

      public List<String> getPermissionsPriority()
      The ordered list of permission-group priority keys.
      Returns:
      priority group names, never null
    • getPermissionGroupKeys

      public Set<String> getPermissionGroupKeys()
      The set of permission group keys defined in the config.
      Returns:
      permission group names, or an empty set if the section is missing
    • getPermissionLimit

      public Object getPermissionLimit(String group, String limitKey)
      A permission-based limit value for a specific group.
      Parameters:
      group - the permission group name
      limitKey - the limit config key
      Returns:
      the permission limit, or null if not set