mirror of
https://github.com/SimplexDevelopment/FeelingLucky.git
synced 2024-11-22 09:55: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'
|
group = 'io.github.simplex'
|
||||||
version = 'Beta-20220422-SNAPSHOT'
|
version = 'Beta-1.0-RC01'
|
||||||
|
|
||||||
repositories {
|
repositories {
|
||||||
mavenCentral()
|
mavenCentral()
|
||||||
|
@ -68,9 +68,11 @@ public final class FeelingLucky extends JavaPlugin {
|
|||||||
|
|
||||||
private void registerListeners() {
|
private void registerListeners() {
|
||||||
try {
|
try {
|
||||||
Class<?>[] listeners = SneakyWorker.getClasses("io.github.simplex.luck.listener");
|
Class<?>[] listeners = SneakyWorker.getClasses(AbstractListener.class.getPackage().getName());
|
||||||
Arrays.stream(listeners).forEach(l -> {
|
Arrays.stream(listeners).forEach(l -> {
|
||||||
if (AbstractListener.class.isAssignableFrom(l)) {
|
if (AbstractListener.class.isAssignableFrom(l)) {
|
||||||
|
if (l.equals(AbstractListener.class)) return;
|
||||||
|
|
||||||
SneakyWorker.sneakyTry(() -> l.getDeclaredConstructor(FeelingLucky.class).newInstance(this));
|
SneakyWorker.sneakyTry(() -> l.getDeclaredConstructor(FeelingLucky.class).newInstance(this));
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
Loading…
Reference in New Issue
Block a user