Улучши методы, чтобы они были более читаемы и не выдавали предупреждений и ошибок.

    public String serialize(ItemStack itemStack) {
        String techName = itemStack.getTag(TECH_NAME);
        if (techName == null) return null;

        int amount = itemStack.amount();

        StringBuilder sb = new StringBuilder();
        sb.append(techName).append(":").append(amount);

        Tag<?>[] components;
        String category = itemStack.getTag(CATEGORY);
        if (!Category.SPECIAL_ITEM.getNamespace().equals(category)) {
            components = new Tag<?>[]{UID, OWNER, PLAYER_KILLS, MOB_KILLS};
        } else {
            components = new Tag<?>[]{POWER};
        }

        for (Tag<?> component : components) {
            Object value = itemStack.getTag(component);
            if (value != null) {
                sb.append(":").append(value);
            } else {
                break;
            }
        }

        return sb.toString();
    }
    
    public ItemStack deserialize(String data) {
        String[] parts = data.split(":");
        if (parts.length < 2) return null;

        String techName = parts[0];
        int amount = Integer.parseInt(parts[1]);

        ItemStack itemStack = getServerItems().get(techName);
        if (itemStack == null) return null;

        ItemStack newItemStack = itemStack.withAmount(amount);

        int index = 2;

        Tag<?>[] components;
        String category = itemStack.getTag(CATEGORY);
        if (!Category.SPECIAL_ITEM.getNamespace().equals(category)) {
            components = new Tag<?>[]{UID, OWNER, PLAYER_KILLS, MOB_KILLS};
        } else {
            components = new Tag<?>[]{POWER};
        }

        for (Tag<?> component : components) {
            if (index < parts.length) {
                String value = parts[index];
                if (value != null && !value.isEmpty()) {
                    newItemStack = newItemStack.with(metaBuilder -> {
                        try {
                            if (component.equals(UID) || component.equals(PLAYER_KILLS) || component.equals(MOB_KILLS) || component.equals(POWER)) {
                                metaBuilder.set((Tag<Integer>) component, Integer.parseInt(value));
                            } else if (component.equals(OWNER)) {
                                metaBuilder.set((Tag<String>) component, value);
                            }
                        } catch (Exception e) {
                            // Handle exception if necessary
                        }
                    });
                }
                index++;
            } else {
                break;
            }
        }

        Integer uid = newItemStack.getTag(UID);
        String owner = newItemStack.getTag(OWNER);
        Integer playerKills = newItemStack.getTag(PLAYER_KILLS);
        Integer mobKills = newItemStack.getTag(MOB_KILLS);

        if (uid != null) {
            newItemStack = newItemStack.with(metaBuilder -> {
                List<Component> lore = Optional.ofNullable(itemStack.get(ItemComponent.LORE)).orElse(new ArrayList<>());

                List<Component> updatedLore = lore.stream()
                        .map(component -> {
                            if (component instanceof TextComponent textComponent) {
                                String currentText = LegacyComponentSerializer.legacySection().serialize(textComponent);

                                String updatedText = currentText
                                        .replace("UID: 0", "UID: " + uid)
                                        .replace("Владелец: null", "Владелец: " + owner)
                                        .replace("Убито игроков: 0", "Убито игроков: " + playerKills)
                                        .replace("Убито мобов: 0", "Убито мобов: " + mobKills);

                                return LegacyComponentSerializer.legacySection().deserialize(updatedText);
                            }
                            return component;
                        })
                        .collect(Collectors.toList());

                metaBuilder.lore(updatedLore);
            });
        }

        return newItemStack;
    }

public final Tag<String> TECH_NAME = Tag.String("techName");
    public final Tag<String> CATEGORY = Tag.String("category");
    public final Tag<String> RARE = Tag.String("rare");
    public final Tag<Integer> UID = Tag.Integer("uid");
    public final Tag<Integer> LEVEL = Tag.Integer("level");
    public final Tag<String> FACTION = Tag.String("faction");
    public final Tag<String> OWNER = Tag.String("owner");
    public final Tag<Boolean> NODROP = Tag.Boolean("nodrop");
    public final Tag<Boolean> ARTEFACT = Tag.Boolean("artefact");
    public final Tag<Boolean> CAP = Tag.Boolean("cap");
    public final Tag<Integer> POWER = Tag.Integer("power");
    public final Tag<Double> VAMPIRISM = Tag.Double("vampirism");
    public final Tag<Integer> MOB_KILLS = Tag.Integer("mobKills");
    public final Tag<Integer> PLAYER_KILLS = Tag.Integer("playerKills");
    public final Tag<Double> DAMAGE = Tag.Double("damage");
    public final Tag<Double> CRITICAL_DAMAGE = Tag.Double("criticalDamage");
    public final Tag<Double> CRITICAL_CHANCE = Tag.Double("criticalChance");
    public final Tag<Integer> COOLDOWN = Tag.Integer("cooldown");
    public final Tag<String> KEY = Tag.String("caseKey");

Пиши на русском.