Finishes the scrapper implementation
Some checks failed
EpicKnarvik97/Blacksmith/pipeline/head There was a failure building this commit

This commit is contained in:
2024-05-04 01:01:56 +02:00
parent 455db78988
commit 4012e532da
30 changed files with 501 additions and 216 deletions

View File

@@ -131,7 +131,7 @@ public abstract class EditCommand<K extends CustomTrait<L>, L extends Setting> i
}
settings.changeValue(setting, newValue);
BlacksmithPlugin.getStringFormatter().displaySuccessMessage(sender,
getValueChangedMessage(setting.getCommandName(), String.valueOf(newValue)));
getValueChangedMessage(setting.getCommandName(), newValue));
//Save the changes immediately to prevent data loss on server crash
CitizensAPI.getNPCRegistry().saveToStore();
}

View File

@@ -215,7 +215,7 @@ public class BlackSmithConfigCommand implements CommandExecutor {
private void updateAllMatchedPrices(@NotNull GlobalBlacksmithSettings settings,
@NotNull BlacksmithSetting blacksmithSetting,
@NotNull String materialName, double newPrice) {
List<Material> materials = ItemHelper.getWildcardMatch(materialName);
List<Material> materials = ItemHelper.getWildcardMatch(materialName, false);
for (Material material : materials) {
if (blacksmithSetting == BlacksmithSetting.BASE_PRICE) {
settings.setBasePrice(material, newPrice);