diff --git a/src/main/java/tools/redstone/redstonetools/utils/ReflectionUtils.java b/src/main/java/tools/redstone/redstonetools/utils/ReflectionUtils.java index eaab5ad7..5792620a 100644 --- a/src/main/java/tools/redstone/redstonetools/utils/ReflectionUtils.java +++ b/src/main/java/tools/redstone/redstonetools/utils/ReflectionUtils.java @@ -108,12 +108,12 @@ public static Set> findClasses(Class clazz) throws IOE } } //noinspection unchecked - return (Set>) classNames.stream() + return classNames.stream() .filter(it -> !it.isEmpty() && !it.isBlank()) .map(ReflectionUtils::loadClass) .filter(Objects::nonNull) .filter(clazz::isAssignableFrom) - .map(clazz::cast) + .map(it -> (Class) it) .collect(Collectors.toSet()); }