mirror of
https://github.com/SimplexDevelopment/FeelingLucky.git
synced 2024-11-21 17:35:01 +00:00
Minor Change
- Version change to Beta 1.0 RC01 - Adjusted the way the listeners are registered
This commit is contained in:
parent
bb9bdcdf03
commit
a4d71b2c0b
@ -3,7 +3,7 @@ plugins {
|
||||
}
|
||||
|
||||
group = 'io.github.simplex'
|
||||
version = 'Beta-20220422-SNAPSHOT'
|
||||
version = 'Beta-1.0-RC01'
|
||||
|
||||
repositories {
|
||||
mavenCentral()
|
||||
|
@ -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));
|
||||
}
|
||||
});
|
||||
|
Loading…
Reference in New Issue
Block a user