<commit_before>package vg.civcraft.mc.civmodcore.util;

import static vg.civcraft.mc.civmodcore.CivModCorePlugin.log;

import java.io.IOException;
import java.util.ArrayList;

import com.google.common.reflect.ClassPath;
import vg.civcraft.mc.civmodcore.ACivMod;

public class ClassUtility {

	public static ArrayList<Class<?>> GetClassesForPlugin(ACivMod plugin) {
		return GetClassesForPlugin(plugin, null);
	}

	public static ArrayList<Class<?>> GetClassesForPlugin(ACivMod plugin, Class<?> ofType) {
		ArrayList<Class<?>> classes = new ArrayList<>();
		try {
			Package pack = plugin.getClass().getPackage();
			if (pack == null) {
				log().info("Package name REQUIRED for annotation loading");
			} else {

				String packageName = pack.getName();
				ClassLoader classloader = plugin.classLoader;
				ClassPath path = ClassPath.from(classloader);

				for (ClassPath.ClassInfo info : path.getTopLevelClassesRecursive(packageName)) {
					Class clazz = null;
					try {
						clazz = Class.forName(info.getName(), true, classloader);
					} catch (NoClassDefFoundError e) {
						log().info("CivModCore failed to load class " + info.getName()
								+ ", you could be missing a dependency. This message is more of an info "
								+ "message useful for debugging. If you see this message you can usually "
								+ "ignore it unless the plugin itself throws an error.");
						continue;
					}
					if (ofType == null || ofType.isAssignableFrom(clazz)) {
						classes.add(clazz);
					}
				}
			}
		} catch (ClassNotFoundException | IOException e) {
			e.printStackTrace();
		}
		return classes;
	}
<commit_msg>Comment out failed class loading for now to avoid NPE<commit_after>package vg.civcraft.mc.civmodcore.util;

import static vg.civcraft.mc.civmodcore.CivModCorePlugin.log;

import java.io.IOException;
import java.util.ArrayList;

import com.google.common.reflect.ClassPath;
import vg.civcraft.mc.civmodcore.ACivMod;

public class ClassUtility {

	public static ArrayList<Class<?>> GetClassesForPlugin(ACivMod plugin) {
		return GetClassesForPlugin(plugin, null);
	}

	public static ArrayList<Class<?>> GetClassesForPlugin(ACivMod plugin, Class<?> ofType) {
		ArrayList<Class<?>> classes = new ArrayList<>();
		try {
			Package pack = plugin.getClass().getPackage();
			if (pack == null) {
				log().info("Package name REQUIRED for annotation loading");
			} else {

				String packageName = pack.getName();
				ClassLoader classloader = plugin.classLoader;
				ClassPath path = ClassPath.from(classloader);

				for (ClassPath.ClassInfo info : path.getTopLevelClassesRecursive(packageName)) {
					Class clazz = null;
					try {
						clazz = Class.forName(info.getName(), true, classloader);
					} catch (NoClassDefFoundError e) {
					//	log().info("CivModCore failed to load class " + info.getName()
					//			+ ", you could be missing a dependency. This message is more of an info "
					//		+ "message useful for debugging. If you see this message you can usually "
					//			+ "ignore it unless the plugin itself throws an error.");
						continue;
					}
					if (ofType == null || ofType.isAssignableFrom(clazz)) {
						classes.add(clazz);
					}
				}
			}
		} catch (ClassNotFoundException | IOException e) {
			e.printStackTrace();
		}
		return classes;
	}

{'fraction_non_alphanumeric': 0.1149285497111584, 'fraction_numerical': 0.0, 'mean_word_length': 3.6272855133614628, 'pattern_counts': {'":': 0, '<': 19, '<?xml version=': 0, '>': 19, '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': '2141931', 'n_tokens_mistral': 1184, 'n_tokens_neox': 981, 'n_words': 261}