Skip to content

Stats Configuration

Ren edited this page Apr 20, 2022 · 3 revisions

» Home » Stats » Configuration

Configuration

  • stats: Each section here is loaded as a stat
    • stat: the name of the stat as the key, to a formula to calculate the value of the stat.

      This is parsed as JavaScript and may use the following variables (plus any that are provided by other plugins, such as "classLevels" and "class" provided by Classes):

      • character: The character (RPKCharacter)
      • player: The player (RPKPlayer) (If you wish to get Bukkit's OfflinePlayer in order to access Bukkit methods, use getBukkitPlayer())
      • minecraftLevel: The player's level in Minecraft (Integer)
      • characterGender: The character's gender from the character implementation (RPKGender)
      • characterAge: The character's age from the character implementation (Integer)
      • characterRace: The character's race from the character implementation (RPKRace)
      • characterHelmet: The character's helmet from the character implementation (ItemStack)
      • characterChestplate: The character's chestplate from the character implementation (ItemStack)
      • characterLeggings: The character's leggings from the character implementation (ItemStack)
      • characterBoots: The character's boots from the character implementation (ItemStack)
      • characterHealth: The character's health from the character implementation (Double)
      • characterMaxHealth: The character's max health from the character implementation (Double)
      • characterMana: The character's mana from the character implementation (Integer)
      • characterMaxMana: The character's max mana from the character implementation (Integer)
      • characterFoodLevel: The character's food level from the character implementation (Integer)
      • characterThirstLevel: The character's thirst level from the character implementation (Integer)

Permissions

rpkit.stats.command.stats:
    description: Allows viewing stats
    default: true

Placeholders

If you are using PlaceholderAPI, you may use placeholders in the format %rpkstats_${stat}%, where ${stat} is the name of the stat. e.g. %rpkstats_strength%.

Clone this wiki locally