<commit_before>package net.nunnerycode.bukkit.mythicdrops.managers;

import java.util.HashSet;
import java.util.LinkedHashSet;
import java.util.Set;
import java.util.logging.Level;
import net.nunnerycode.bukkit.mythicdrops.api.MythicDrops;
import net.nunnerycode.bukkit.mythicdrops.api.items.CustomItem;
import net.nunnerycode.bukkit.mythicdrops.api.managers.CustomItemManager;
import net.nunnerycode.bukkit.mythicdrops.utils.RandomRangeUtils;
import org.bukkit.inventory.ItemStack;

public class MythicCustomItemManager implements CustomItemManager {
    private final MythicDrops plugin;
    private final Set<CustomItem> customItems;

    public MythicCustomItemManager(MythicDrops plugin) {
        this.plugin = plugin;
        customItems = new LinkedHashSet<CustomItem>();
    }

    public Set<CustomItem> getCustomItems() {
        return customItems;
    }

    public void debugCustomItems() {
        getPlugin().debug(Level.INFO, "Loaded custom items size: " + customItems.size());
    }

    public MythicDrops getPlugin() {
        return plugin;
    }

    public CustomItem getCustomItemFromItemStack(ItemStack itemStack) {
        for (CustomItem ci : customItems) {
            if (ci.toItemStack().isSimilar(itemStack)) {
                return ci;
            }
        }
        return null;
    }

	@Override
	public CustomItem createCustomItemFromItemStack(ItemStack itemStack) {
		return null;  //To change body of implemented methods use File | Settings | File Templates.
	}

	public CustomItem getCustomItemFromDisplayName(String name) {
        for (CustomItem ci : customItems) {
            if (ci.getDisplayName().equalsIgnoreCase(name)) {
                return ci;
            }
        }
        throw new NullPointerException(name + " is not the display name of a loaded Custom Item");
    }

    public CustomItem getCustomItemFromName(String name) {
        for (CustomItem ci : customItems) {
            if (ci.getName().equalsIgnoreCase(name)) {<commit_msg>implementation of createCustomItemStack does nothing<commit_after>package net.nunnerycode.bukkit.mythicdrops.managers;

import java.util.HashSet;
import java.util.LinkedHashSet;
import java.util.Set;
import java.util.logging.Level;
import net.nunnerycode.bukkit.mythicdrops.api.MythicDrops;
import net.nunnerycode.bukkit.mythicdrops.api.items.CustomItem;
import net.nunnerycode.bukkit.mythicdrops.api.managers.CustomItemManager;
import net.nunnerycode.bukkit.mythicdrops.utils.RandomRangeUtils;
import org.bukkit.inventory.ItemStack;

public class MythicCustomItemManager implements CustomItemManager {
    private final MythicDrops plugin;
    private final Set<CustomItem> customItems;

    public MythicCustomItemManager(MythicDrops plugin) {
        this.plugin = plugin;
        customItems = new LinkedHashSet<CustomItem>();
    }

    public Set<CustomItem> getCustomItems() {
        return customItems;
    }

    public void debugCustomItems() {
        getPlugin().debug(Level.INFO, "Loaded custom items size: " + customItems.size());
    }

    public MythicDrops getPlugin() {
        return plugin;
    }

    public CustomItem getCustomItemFromItemStack(ItemStack itemStack) {
        for (CustomItem ci : customItems) {
            if (ci.toItemStack().isSimilar(itemStack)) {
                return ci;
            }
        }
        return null;
    }

	@Override
	public CustomItem createCustomItemFromItemStack(ItemStack itemStack) {
		return null;
	}

	public CustomItem getCustomItemFromDisplayName(String name) {
        for (CustomItem ci : customItems) {
            if (ci.getDisplayName().equalsIgnoreCase(name)) {
                return ci;
            }
        }
        throw new NullPointerException(name + " is not the display name of a loaded Custom Item");
    }

    public CustomItem getCustomItemFromName(String name) {
        for (CustomItem ci : customItems) {
            if (ci.getName().equalsIgnoreCase(name)) {
{'fraction_non_alphanumeric': 0.08674759736975216, 'fraction_numerical': 0.0, 'mean_word_length': 3.216417910447761, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 9, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4268268', 'n_tokens_mistral': 1196, 'n_tokens_neox': 1142, 'n_words': 247}