mirror of
https://github.com/SimplexDevelopment/FeelingLucky.git
synced 2025-07-01 17:46:42 +00:00
Minor Change
- Version change to Beta 1.0 RC01 - Adjusted the way the listeners are registered
This commit is contained in:
@ -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));
|
||||
}
|
||||
});
|
||||
|
Reference in New Issue
Block a user