From 68b4be0fdf3e1e5ab0d1f45a90521bbe1ab2e354 Mon Sep 17 00:00:00 2001 From: Jules Date: Sat, 28 Oct 2023 00:30:09 +0200 Subject: [PATCH] Added {upgrade_level} as lore placeholder --- .../src/main/java/net/Indyuce/mmoitems/stat/UpgradeStat.java | 3 +++ MMOItems-Dist/src/main/resources/config.yml | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/MMOItems-API/src/main/java/net/Indyuce/mmoitems/stat/UpgradeStat.java b/MMOItems-API/src/main/java/net/Indyuce/mmoitems/stat/UpgradeStat.java index 5b1e0f55..397999f7 100644 --- a/MMOItems-API/src/main/java/net/Indyuce/mmoitems/stat/UpgradeStat.java +++ b/MMOItems-API/src/main/java/net/Indyuce/mmoitems/stat/UpgradeStat.java @@ -65,6 +65,9 @@ public class UpgradeStat extends ItemStat implements C // Show in lore item.addItemTag(getAppliedNBT(data)); + // Special placeholder + item.getLore().registerPlaceholder("upgrade_level", String.valueOf(data.getLevel())); + // Show in lore if (data.getMaxUpgrades() > 0) item.getLore().insert(getPath(), diff --git a/MMOItems-Dist/src/main/resources/config.yml b/MMOItems-Dist/src/main/resources/config.yml index 070892ca..8da9a4b5 100644 --- a/MMOItems-Dist/src/main/resources/config.yml +++ b/MMOItems-Dist/src/main/resources/config.yml @@ -91,7 +91,7 @@ item-upgrading: # Whether to display in Item Name or Lore # Disable if item renaming is available to players. # If set to 'false', remember to include - # %upgrade_level% in your item lore. + # {upgrade_level} in your item lore. display-in-name: true # Whether or not to display which