diff --git a/eco-core/core-plugin/src/main/java/com/willfp/ecoenchants/enchantments/custom/CustomEcoEnchant.java b/eco-core/core-plugin/src/main/java/com/willfp/ecoenchants/enchantments/custom/CustomEcoEnchant.java index d44b7c1f..793d1226 100644 --- a/eco-core/core-plugin/src/main/java/com/willfp/ecoenchants/enchantments/custom/CustomEcoEnchant.java +++ b/eco-core/core-plugin/src/main/java/com/willfp/ecoenchants/enchantments/custom/CustomEcoEnchant.java @@ -37,6 +37,11 @@ public class CustomEcoEnchant extends EcoEnchant { } } + @Override + public String getPlaceholder(final int level) { + return this.getLevel(level).getValuePlaceholder(); + } + @Override protected void postUpdate() { for (EnchantmentTarget target : this.getTargets()) { diff --git a/eco-core/core-plugin/src/main/java/com/willfp/ecoenchants/enchantments/custom/CustomEcoEnchantLevel.java b/eco-core/core-plugin/src/main/java/com/willfp/ecoenchants/enchantments/custom/CustomEcoEnchantLevel.java index 72d46960..aa25fa88 100644 --- a/eco-core/core-plugin/src/main/java/com/willfp/ecoenchants/enchantments/custom/CustomEcoEnchantLevel.java +++ b/eco-core/core-plugin/src/main/java/com/willfp/ecoenchants/enchantments/custom/CustomEcoEnchantLevel.java @@ -30,6 +30,12 @@ public class CustomEcoEnchantLevel implements Holder { */ private final Set effects = new HashSet<>(); + /** + * The value placeholder. + */ + @Getter + private final String valuePlaceholder; + /** * Create custom EcoEnchant level. * @@ -47,6 +53,8 @@ public class CustomEcoEnchantLevel implements Holder { for (Config cfg : config.getSubsections("conditions")) { conditions.add(Conditions.compile(cfg, "Custom EcoEnchant ID " + parent.getKey().getKey())); } + + this.valuePlaceholder = config.getString("value-placeholder"); } @NotNull