private Map<Enchantment, Integer> getEnchantUp(AnvilInventory ai) {
        Map<Enchantment, Integer> tmp1 = new HashMap<>();
        Map<Enchantment, Integer> tmp2 = new HashMap<>();
        for(ItemStack i: ai.getContents()) {
            if(tmp1.isEmpty()) {
                tmp1 = i.getEnchantments();
                continue;
            }
                
            for(Map.Entry<Enchantment, Integer> enc : i.getEnchantments().entrySet()) {
                if(tmp1.containsKey(enc.getKey()) && tmp1.get(enc.getKey()) == enc.getValue()) {
                    tmp2.put(enc.getKey(), enc.getValue());
                }
            }
        }
        return tmp2;
    }