Skip to content

Commit a4d71b2

Browse files
committed
Minor Change
- Version change to Beta 1.0 RC01 - Adjusted the way the listeners are registered
1 parent bb9bdcd commit a4d71b2

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ plugins {
33
}
44

55
group = 'io.github.simplex'
6-
version = 'Beta-20220422-SNAPSHOT'
6+
version = 'Beta-1.0-RC01'
77

88
repositories {
99
mavenCentral()

src/main/java/io/github/simplex/luck/FeelingLucky.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,9 +68,11 @@ private void loadPlayerConfigurations() {
6868

6969
private void registerListeners() {
7070
try {
71-
Class<?>[] listeners = SneakyWorker.getClasses("io.github.simplex.luck.listener");
71+
Class<?>[] listeners = SneakyWorker.getClasses(AbstractListener.class.getPackage().getName());
7272
Arrays.stream(listeners).forEach(l -> {
7373
if (AbstractListener.class.isAssignableFrom(l)) {
74+
if (l.equals(AbstractListener.class)) return;
75+
7476
SneakyWorker.sneakyTry(() -> l.getDeclaredConstructor(FeelingLucky.class).newInstance(this));
7577
}
7678
});

0 commit comments

Comments
 (0)