Minor Change

- Version change to Beta 1.0 RC01
- Adjusted the way the listeners are registered
This commit is contained in:
Paldiu 2022-04-25 16:33:54 -05:00
parent bb9bdcdf03
commit a4d71b2c0b
2 changed files with 4 additions and 2 deletions

View File

@ -3,7 +3,7 @@ plugins {
}
group = 'io.github.simplex'
version = 'Beta-20220422-SNAPSHOT'
version = 'Beta-1.0-RC01'
repositories {
mavenCentral()

View File

@ -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));
}
});