Fixes merge problems
	
		
			
	
		
	
	
		
	
		
			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:
		@@ -30,10 +30,6 @@ import net.knarcraft.knarlib.plugin.ConfigCommentPlugin;
 | 
				
			|||||||
import net.knarcraft.knarlib.util.ConfigHelper;
 | 
					import net.knarcraft.knarlib.util.ConfigHelper;
 | 
				
			||||||
import net.knarcraft.knarlib.util.UpdateChecker;
 | 
					import net.knarcraft.knarlib.util.UpdateChecker;
 | 
				
			||||||
import org.bukkit.Bukkit;
 | 
					import org.bukkit.Bukkit;
 | 
				
			||||||
import org.bukkit.command.CommandExecutor;
 | 
					 | 
				
			||||||
import org.bukkit.command.PluginCommand;
 | 
					 | 
				
			||||||
import org.bukkit.command.TabCompleter;
 | 
					 | 
				
			||||||
import org.bukkit.configuration.InvalidConfigurationException;
 | 
					 | 
				
			||||||
import org.bukkit.configuration.file.FileConfiguration;
 | 
					import org.bukkit.configuration.file.FileConfiguration;
 | 
				
			||||||
import org.bukkit.event.Event;
 | 
					import org.bukkit.event.Event;
 | 
				
			||||||
import org.bukkit.plugin.PluginDescriptionFile;
 | 
					import org.bukkit.plugin.PluginDescriptionFile;
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -157,6 +157,8 @@ public class BlackSmithConfigCommand implements CommandExecutor {
 | 
				
			|||||||
                return false;
 | 
					                return false;
 | 
				
			||||||
            }
 | 
					            }
 | 
				
			||||||
            ItemType itemType = ItemType.ENCHANTMENT;
 | 
					            ItemType itemType = ItemType.ENCHANTMENT;
 | 
				
			||||||
 | 
					            // Note: While depreciated in Spigot, the new method is not available for Paper
 | 
				
			||||||
 | 
					            @SuppressWarnings("deprecation")
 | 
				
			||||||
            String itemChanged = enchantment.getKey().getKey();
 | 
					            String itemChanged = enchantment.getKey().getKey();
 | 
				
			||||||
            settings.setEnchantmentCost(enchantment, newPrice);
 | 
					            settings.setEnchantmentCost(enchantment, newPrice);
 | 
				
			||||||
            Translatable.getItemValueChangedMessage(blacksmithSetting.getCommandName(), itemType, itemChanged, newValue).success(sender);
 | 
					            Translatable.getItemValueChangedMessage(blacksmithSetting.getCommandName(), itemType, itemChanged, newValue).success(sender);
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -523,6 +523,8 @@ public class GlobalBlacksmithSettings implements Settings<BlacksmithSetting> {
 | 
				
			|||||||
        //Load all enchantment prices
 | 
					        //Load all enchantment prices
 | 
				
			||||||
        ConfigurationSection enchantmentCostNode = getAndCreateSection(fileConfiguration, getBase(BlacksmithSetting.ENCHANTMENT_COST.getPath()));
 | 
					        ConfigurationSection enchantmentCostNode = getAndCreateSection(fileConfiguration, getBase(BlacksmithSetting.ENCHANTMENT_COST.getPath()));
 | 
				
			||||||
        for (Enchantment enchantment : this.enchantmentCosts.keySet()) {
 | 
					        for (Enchantment enchantment : this.enchantmentCosts.keySet()) {
 | 
				
			||||||
 | 
					            // Note: While depreciated in Spigot, the new method is not available for Paper
 | 
				
			||||||
 | 
					            //noinspection deprecation
 | 
				
			||||||
            enchantmentCostNode.set(unNormalizeName(enchantment.getKey().getKey()), this.enchantmentCosts.get(enchantment));
 | 
					            enchantmentCostNode.set(unNormalizeName(enchantment.getKey().getKey()), this.enchantmentCosts.get(enchantment));
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -196,7 +196,7 @@ public record ActionCost(double monetaryCost, int expCost, @Nullable ItemStack i
 | 
				
			|||||||
                    continue;
 | 
					                    continue;
 | 
				
			||||||
                }
 | 
					                }
 | 
				
			||||||
            }
 | 
					            }
 | 
				
			||||||
            output.put(entry.getKey(), (Integer) entry.getValue().getAmount());
 | 
					            output.put(entry.getKey(), entry.getValue().getAmount());
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        return output;
 | 
					        return output;
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -59,6 +59,8 @@ public class ReforgeSession extends Session implements Runnable {
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
            enchantments = new ArrayList<>();
 | 
					            enchantments = new ArrayList<>();
 | 
				
			||||||
            for (Enchantment enchantment : enchantmentRegistry) {
 | 
					            for (Enchantment enchantment : enchantmentRegistry) {
 | 
				
			||||||
 | 
					                // Note: While depreciated in Spigot, the new method is not available for Paper
 | 
				
			||||||
 | 
					                //noinspection deprecation
 | 
				
			||||||
                enchantments.add(enchantment.getKey().getKey());
 | 
					                enchantments.add(enchantment.getKey().getKey());
 | 
				
			||||||
            }
 | 
					            }
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -215,12 +215,12 @@ public class ScrapperTrait extends CustomTrait<ScrapperSetting> {
 | 
				
			|||||||
        }
 | 
					        }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        if (!getSettings().splitEnchantedBook()) {
 | 
					        if (!getSettings().splitEnchantedBook()) {
 | 
				
			||||||
            sendNPCMessage(this.npc, player, getSettings().getCannotSalvageEnchantedBookMessage());
 | 
					            NPCFormatter.sendNPCMessage(this.npc, player, getSettings().getCannotSalvageEnchantedBookMessage());
 | 
				
			||||||
            return new SalvageResult(SalvageMethod.ENCHANTED_BOOK, new ArrayList<>(), SalvageState.NO_SALVAGE, 0);
 | 
					            return new SalvageResult(SalvageMethod.ENCHANTED_BOOK, new ArrayList<>(), SalvageState.NO_SALVAGE, 0);
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        if (SalvageHelper.getEnchantmentCount(itemInHand) <= 1) {
 | 
					        if (SalvageHelper.getEnchantmentCount(itemInHand) <= 1) {
 | 
				
			||||||
            sendNPCMessage(this.npc, player, getSettings().getCannotSplitEnchantedBookFurtherMessage());
 | 
					            NPCFormatter.sendNPCMessage(this.npc, player, getSettings().getCannotSplitEnchantedBookFurtherMessage());
 | 
				
			||||||
            return new SalvageResult(SalvageMethod.ENCHANTED_BOOK, new ArrayList<>(), SalvageState.NO_SALVAGE, 0);
 | 
					            return new SalvageResult(SalvageMethod.ENCHANTED_BOOK, new ArrayList<>(), SalvageState.NO_SALVAGE, 0);
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -1,9 +1,9 @@
 | 
				
			|||||||
package net.knarcraft.blacksmith.util;
 | 
					package net.knarcraft.blacksmith.util;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
import net.knarcraft.blacksmith.BlacksmithPlugin;
 | 
					 | 
				
			||||||
import net.knarcraft.blacksmith.container.ActionCost;
 | 
					import net.knarcraft.blacksmith.container.ActionCost;
 | 
				
			||||||
import net.knarcraft.blacksmith.formatting.BlacksmithTranslatableMessage;
 | 
					import net.knarcraft.blacksmith.formatting.Translatable;
 | 
				
			||||||
import net.knarcraft.blacksmith.property.CostType;
 | 
					import net.knarcraft.blacksmith.property.CostType;
 | 
				
			||||||
 | 
					import net.knarcraft.knarlib.formatting.FormatBuilder;
 | 
				
			||||||
import org.bukkit.Bukkit;
 | 
					import org.bukkit.Bukkit;
 | 
				
			||||||
import org.bukkit.command.CommandSender;
 | 
					import org.bukkit.command.CommandSender;
 | 
				
			||||||
import org.bukkit.entity.Player;
 | 
					import org.bukkit.entity.Player;
 | 
				
			||||||
@@ -50,8 +50,7 @@ public final class CostHelper {
 | 
				
			|||||||
            }
 | 
					            }
 | 
				
			||||||
            return cost;
 | 
					            return cost;
 | 
				
			||||||
        } catch (NumberFormatException exception) {
 | 
					        } catch (NumberFormatException exception) {
 | 
				
			||||||
            BlacksmithPlugin.getStringFormatter().displayErrorMessage(commandSender,
 | 
					            new FormatBuilder(Translatable.DOUBLE_COST_REQUIRED).error(commandSender);
 | 
				
			||||||
                    BlacksmithTranslatableMessage.DOUBLE_COST_REQUIRED);
 | 
					 | 
				
			||||||
            throw new IllegalArgumentException("Invalid cost given");
 | 
					            throw new IllegalArgumentException("Invalid cost given");
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -136,6 +136,8 @@ public final class SalvageHelper {
 | 
				
			|||||||
        } else {
 | 
					        } else {
 | 
				
			||||||
            return null;
 | 
					            return null;
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
 | 
					        // Note: While depreciated in Spigot, the new method is not available for Paper
 | 
				
			||||||
 | 
					        @SuppressWarnings("deprecation")
 | 
				
			||||||
        Material patternMaterial = Material.matchMaterial(armorTrim.getPattern().getKey().getKey() +
 | 
					        Material patternMaterial = Material.matchMaterial(armorTrim.getPattern().getKey().getKey() +
 | 
				
			||||||
                "_ARMOR_TRIM_SMITHING_TEMPLATE");
 | 
					                "_ARMOR_TRIM_SMITHING_TEMPLATE");
 | 
				
			||||||
        if (patternMaterial != null) {
 | 
					        if (patternMaterial != null) {
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -79,6 +79,8 @@ public final class TabCompleteValuesHelper {
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
        List<String> enchantments = new ArrayList<>();
 | 
					        List<String> enchantments = new ArrayList<>();
 | 
				
			||||||
        for (Enchantment enchantment : enchantmentRegistry) {
 | 
					        for (Enchantment enchantment : enchantmentRegistry) {
 | 
				
			||||||
 | 
					            // Note: While depreciated in Spigot, the new method is not available for Paper
 | 
				
			||||||
 | 
					            //noinspection deprecation
 | 
				
			||||||
            enchantments.add(enchantment.getKey().getKey());
 | 
					            enchantments.add(enchantment.getKey().getKey());
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
        return enchantments;
 | 
					        return enchantments;
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user