Sueta

Prekoyte's Powerlevels

0.3.4

Get Minecraft-Dungeons style-like power levels for your items and armor

·Plugin

tryingagain.jpg
Prekoyte's PowerLevel

Get your power level based on your items
Uses PlaceholderAPI

Requirements

  • Paper/Spigot 1.21+ (built against Paper API 1.21.1)
  • Java 21
  • PlaceholderAPI (depend)
  • Permissions plugin (e.g., LuckPerms)

Features

  • Power from HP, armor, main/offhand, artifacts, elite and vanilla enchants, and permission weights.
  • Rules engine: per-world and per-permission multipliers on total power.
  • Admin workflow: in-game rules management and update toggle.
  • PlaceholderAPI expansion: %powerlevel_power%, %powerlevel_powerdecimal%, %powerlevel_power_<player>%, %powerlevel_color%.
  • Configurable colors, whitelist, offhand toggle, cumulative mode, auto-permission population.
  • Custom item and artifact weights (material or display-name based) and elite enchant lore parsing.
  • Thread-safe placeholder resolution with resilient config parsing and update checking.

Commands and Help

  • /power or /power show [player] — show your (or another online player’s) power. Console must specify a target.
  • /power reload — reload all configs.
  • /power admin rules list|add|remove — manage rule multipliers.
  • /power admin updates on|off — toggle background update checks.
  • /power help — shows the above in-game.

Permissions

  • powerlevel.show — view own power (default: true)
  • powerlevel.show.others — view others
  • powerlevel.reload — reload configs
  • powerlevel.admin — access admin subcommands (rules/updates)
  • Optional weights: add entries under permission-power in config.yml to give power for specific permissions.

Power Sources (what is counted)

  • HP: hp-power.per-hp, per-max-hp, and for-max-hp bonuses.
  • Armor: armor.yml material weights plus enchantments.
  • Main/Offhand: item.yml weights plus enchantments; offhand obeys do-offhand, do-whitelist, whitelist.
  • Artifacts (inventory items not equipped): item.yml -> Artifact and CustomArtifact; also counts their enchantments. Items in armor slots, main-hand, or offhand are excluded.
  • Custom items: item.yml -> CustomItem and CustomArtifact matched by item display name (color stripped). Material keys are lower-case (e.g., diamond_sword).
  • Permissions: permission-power adds flat power; rules.permission-multipliers multiplies final power for holders.

Enchantments

  • Standard enchants: enchantments.yml under Enchantments. If do-cumulative is true, uses the cumulative value times level; otherwise uses the per-level entry.
  • Elite enchants from lore: enchantments.yml under elite. Lore must be “Name RomanNumeral” (e.g., Shadow Assassin V); color codes ignored. do-cumulative also affects elite enchants (cumulative times level vs per-level entries).

Rules (Multipliers)

  • rules.world-multipliers: map world names to multipliers (no wildcards).
  • rules.permission-multipliers: map permissions to multipliers (case-insensitive match).
  • Both sets multiply the total power after all contributions are summed.

Config Highlights (config.yml)

  • dynamic-reload: reload configs on every calculation (testing only).
  • do-offhand, do-whitelist, whitelist: control offhand behavior.
  • hp-power: per-hp, per-max-hp, and bonus-at-max values.
  • do-cumulative: use cumulative power for enchant levels (standard and elite).
  • permission-power: map permissions to flat power.
  • do-auto-generate: when true, unseen permissions are added to permission-power at 0.0; use auto-generate-flush-seconds to control how often they are saved.
  • rules.world-multipliers: map world names to multipliers.
  • rules.permission-multipliers: map permissions to multipliers.
  • update-checks: enable/disable async update checks on startup.
  • colors: colors range list drives %powerlevel_color%.

Admin Workflow Examples

  • List rules: /power admin rules list
  • Add world multiplier: /power admin rules add world world_nether 2.0
  • Remove world multiplier: /power admin rules remove world world_nether
  • Add permission multiplier: /power admin rules add permission vip.tier3 1.5
  • Remove permission multiplier: /power admin rules remove permission vip.tier3
  • Toggle updates: /power admin updates off (or on)
  • Flush auto-generated permissions: /power admin flush

Placeholders (PlaceholderAPI)

  • %powerlevel_power% — integer floor of power.
  • %powerlevel_powerdecimal% — one decimal place.
  • %powerlevel_power_<player>% — target another online player.
  • %powerlevel_color% — color code from configured ranges.

Installation

  1. Drop PowerLevel-0.3.0.jar into /plugins.
  2. Ensure PlaceholderAPI is installed.
  3. Restart the server.
  4. Grant permissions via your permissions plugin (e.g., LuckPerms).
  5. Edit config.yml, enchantments.yml, item.yml, armor.yml as needed, then /power reload.

Notes and Tips

  • Remove a specific rule with /power admin rules remove ...; rules live under rules in config.yml.
  • Wildcard worlds are not supported; list each world explicitly.
  • do-auto-generate: when true, unseen permissions get added to permission-power at 0.0 for later tuning.
  • Use auto-generate-flush-seconds to tune how often auto-generated permissions are persisted; set lower for faster durability or higher to reduce disk writes.
  • Keep dynamic-reload off in production to avoid extra config I/O.

yessir.jpg

Similar projects

Plugin →