mirror of
https://github.com/Auxilor/EcoEnchants.git
synced 2025-01-24 00:41:23 +01:00
More formatting changes
This commit is contained in:
parent
cf47b0a480
commit
63bd87ff66
@ -258,22 +258,23 @@ public class EnchantmentCache {
|
||||
numberString += level;
|
||||
}
|
||||
|
||||
String appendedName = name + numberString;
|
||||
|
||||
if (level > enchantment.getMaxLevel() && PLUGIN.getDisplayModule().getOptions().getMaxLevelOptions().isReformatAboveMaxLevel()) {
|
||||
String clone = rawName;
|
||||
|
||||
String color = PLUGIN.getDisplayModule().getOptions().getMaxLevelOptions().getAboveMaxLevelFormat();
|
||||
if (color.contains("{}")) {
|
||||
appendedName = color.replace("{}", appendedName);
|
||||
clone = color.replace("{}", clone);
|
||||
} else {
|
||||
appendedName = color + appendedName;
|
||||
clone = color + clone;
|
||||
}
|
||||
|
||||
appendedName = StringUtils.format(appendedName);
|
||||
return StringUtils.format(clone + numberString);
|
||||
} else {
|
||||
return name + numberString;
|
||||
}
|
||||
return appendedName;
|
||||
} else {
|
||||
return name;
|
||||
}
|
||||
|
||||
return name;
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -33,6 +33,6 @@ public class MaxLevelOptions extends PluginDependent<EcoPlugin> {
|
||||
*/
|
||||
public void update() {
|
||||
reformatAboveMaxLevel = this.getPlugin().getConfigYml().getBool("lore.above-max-level.reformat");
|
||||
aboveMaxLevelFormat = this.getPlugin().getLangYml().getString("above-max-level-color", false);
|
||||
aboveMaxLevelFormat = this.getPlugin().getLangYml().getBukkitHandle().getString("above-max-level-color");
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user