Implements some necessary code for the scrapper
All checks were successful
EpicKnarvik97/Blacksmith/pipeline/head This commit looks good
All checks were successful
EpicKnarvik97/Blacksmith/pipeline/head This commit looks good
Implements ignored salvage Implements salvage-able items Adds some TODOs Implements salvage fail chance Moves several methods to ItemHelper Adds option for allowing extended salvage
This commit is contained in:
@@ -19,6 +19,8 @@ import org.bukkit.enchantments.Enchantment;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* The command used for changing global blacksmith configuration options
|
||||
*/
|
||||
@@ -213,12 +215,8 @@ public class BlackSmithConfigCommand implements CommandExecutor {
|
||||
private void updateAllMatchedPrices(@NotNull GlobalBlacksmithSettings settings,
|
||||
@NotNull BlacksmithSetting blacksmithSetting,
|
||||
@NotNull String materialName, double newPrice) {
|
||||
String search = InputParsingHelper.regExIfy(materialName);
|
||||
for (Material material : ItemHelper.getAllReforgeAbleMaterials()) {
|
||||
if (!material.name().matches(search)) {
|
||||
continue;
|
||||
}
|
||||
|
||||
List<Material> materials = ItemHelper.getWildcardMatch(materialName);
|
||||
for (Material material : materials) {
|
||||
if (blacksmithSetting == BlacksmithSetting.BASE_PRICE) {
|
||||
settings.setBasePrice(material, newPrice);
|
||||
} else {
|
||||
|
Reference in New Issue
Block a user