diff --git a/build.gradle b/build.gradle index 9408900..404f8a9 100644 --- a/build.gradle +++ b/build.gradle @@ -3,7 +3,7 @@ plugins { } group = 'io.github.simplex' -version = 'Beta-20220422-SNAPSHOT' +version = 'Beta-1.0-RC01' repositories { mavenCentral() diff --git a/src/main/java/io/github/simplex/luck/FeelingLucky.java b/src/main/java/io/github/simplex/luck/FeelingLucky.java index 95e878e..015f639 100644 --- a/src/main/java/io/github/simplex/luck/FeelingLucky.java +++ b/src/main/java/io/github/simplex/luck/FeelingLucky.java @@ -68,9 +68,11 @@ public final class FeelingLucky extends JavaPlugin { private void registerListeners() { try { - Class[] listeners = SneakyWorker.getClasses("io.github.simplex.luck.listener"); + Class[] listeners = SneakyWorker.getClasses(AbstractListener.class.getPackage().getName()); Arrays.stream(listeners).forEach(l -> { if (AbstractListener.class.isAssignableFrom(l)) { + if (l.equals(AbstractListener.class)) return; + SneakyWorker.sneakyTry(() -> l.getDeclaredConstructor(FeelingLucky.class).newInstance(this)); } });