Adds optional ability to reforge anvils #15
All checks were successful
EpicKnarvik97/Blacksmith/pipeline/head This commit looks good
All checks were successful
EpicKnarvik97/Blacksmith/pipeline/head This commit looks good
This commit is contained in:
@ -91,6 +91,7 @@ public class EconomyManager {
|
||||
private static double getCost(ItemStack item) {
|
||||
GlobalSettings globalSettings = BlacksmithPlugin.getInstance().getSettings();
|
||||
Material material = item.getType();
|
||||
|
||||
//Calculate the base price
|
||||
double price = globalSettings.getBasePrice(material);
|
||||
|
||||
@ -106,6 +107,11 @@ public class EconomyManager {
|
||||
|
||||
//Increase price for any enchantments
|
||||
price += getEnchantmentCost(item);
|
||||
|
||||
//Override the cost for anvils
|
||||
if (ItemHelper.isAnvil(material, true)) {
|
||||
price = globalSettings.getAnvilCost(material);
|
||||
}
|
||||
return price;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user