From 3f10d1c04d7a3c328f6517fcfbc63e70d6f27d66 Mon Sep 17 00:00:00 2001 From: cyklon73 Date: Sun, 17 Mar 2024 16:16:23 +0100 Subject: [PATCH] listener package fix --- src/main/java/de/cyklon/jevent/JEvent.java | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/src/main/java/de/cyklon/jevent/JEvent.java b/src/main/java/de/cyklon/jevent/JEvent.java index 7dabd17..b20f621 100644 --- a/src/main/java/de/cyklon/jevent/JEvent.java +++ b/src/main/java/de/cyklon/jevent/JEvent.java @@ -135,10 +135,7 @@ private ReflectPackage load(OfflinePackage pkg) { private Set getPackages(OfflinePackage pkg) { Set result = new HashSet<>(); if (!pkg.getDirectClasses().isEmpty()) result.add(pkg.load()); - pkg.getPackages().stream() - .filter(p -> !p.getDirectClasses().isEmpty()) - .map(OfflinePackage::load) - .forEach(this::getPackages); + pkg.getPackages().forEach(p -> result.addAll(getPackages(p))); return result; }