mirror of
https://github.com/Auxilor/EcoEnchants.git
synced 2024-11-26 15:45:12 +01:00
Added value-placeholder option to custom ecoenchants
This commit is contained in:
parent
384ff82adb
commit
adcfaccbf5
@ -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()) {
|
||||
|
@ -30,6 +30,12 @@ public class CustomEcoEnchantLevel implements Holder {
|
||||
*/
|
||||
private final Set<ConfiguredEffect> 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
|
||||
|
Loading…
Reference in New Issue
Block a user