Class LevelsFile

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

public final class LevelsFile extends ResourceFile
Typed accessor for levels.yml.
  • Constructor Details

  • Method Details

    • isEnabled

      public boolean isEnabled()
      Whether the region leveling system is enabled.
      Returns:
      true if leveling is active, defaults to false
    • getTimeout

      public int getTimeout()
      The timeout (in minutes) between level-up reward notifications.
      Returns:
      timeout in minutes, defaults to 0 (no cooldown)
    • getKillXpMin

      public int getKillXpMin(String entityType)
      The minimum XP awarded for killing a specific entity type.
      Parameters:
      entityType - the Bukkit entity type name
      Returns:
      minimum XP, defaults to 0
    • getKillXpMax

      public int getKillXpMax(String entityType)
      The maximum XP awarded for killing a specific entity type.
      Parameters:
      entityType - the Bukkit entity type name
      Returns:
      maximum XP, defaults to the min value if only one entry exists
    • getRewardChunks

      public int getRewardChunks(int level)
      The chunk-reward bonus for reaching a specific level.
      Parameters:
      level - the region level
      Returns:
      bonus chunks, defaults to 0
    • getRewardMembers

      public int getRewardMembers(int level)
      The member-reward bonus for reaching a specific level.
      Parameters:
      level - the region level
      Returns:
      bonus members, defaults to 0
    • getRewardSubAreas

      public int getRewardSubAreas(int level)
      The sub-area-reward bonus for reaching a specific level.
      Parameters:
      level - the region level
      Returns:
      bonus sub-areas, defaults to 0
    • getRewardUpkeepReduction

      public int getRewardUpkeepReduction(int level)
      The upkeep-reduction percentage for reaching a specific level.
      Parameters:
      level - the region level
      Returns:
      upkeep-reduction percentage, defaults to 0