<commit_before>package com.conventnunnery.plugins.mythicdrops.managers;

import com.conventnunnery.libraries.utils.RandomUtils;
import com.conventnunnery.plugins.mythicdrops.MythicDrops;
import com.conventnunnery.plugins.mythicdrops.api.items.CustomItem;
import com.conventnunnery.plugins.mythicdrops.api.tiers.Tier;

import java.util.HashSet;
import java.util.Set;

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

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

    public MythicDrops getPlugin() {
        return plugin;
    }

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

    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)) {
                return ci;
            }
        }
        throw new NullPointerException(name + " is not the name of a loaded Custom Item");<commit_msg>adding debug for Custom Items<commit_after>package com.conventnunnery.plugins.mythicdrops.managers;

import com.conventnunnery.libraries.utils.RandomUtils;
import com.conventnunnery.plugins.mythicdrops.MythicDrops;
import com.conventnunnery.plugins.mythicdrops.api.items.CustomItem;
import com.conventnunnery.plugins.mythicdrops.api.tiers.Tier;

import java.util.HashSet;
import java.util.Set;
import java.util.logging.Level;

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

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

    public MythicDrops getPlugin() {
        return plugin;
    }

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

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

    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)) {
                return ci;
            }
        }
        throw new NullPointerException(name + " is not the name of a loaded Custom Item");
{'fraction_non_alphanumeric': 0.0874751491053678, 'fraction_numerical': 0.0, 'mean_word_length': 2.9309895833333335, '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': '6206608', 'n_tokens_mistral': 900, 'n_tokens_neox': 872, 'n_words': 198}