summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author zaaarf <me@zaaarf.foo>2024-08-30 14:05:30 +0200
committer zaaarf <me@zaaarf.foo>2024-08-30 14:05:30 +0200
commit81968f1c1685ca070a64632c047d6c1dc4a032b9 (patch)
tree45234c0fcfe2b9f766ef4c7dd36a931d5f782ae8
parent3dc755f0c7b2385daddea1563ba91c727b37a07b (diff)
fix: actually register the listener0.3.2
-rw-r--r--src/main/java/ftbsc/geb/GEB.java2
-rw-r--r--src/main/java/ftbsc/geb/api/IBus.java1
2 files changed, 3 insertions, 0 deletions
diff --git a/src/main/java/ftbsc/geb/GEB.java b/src/main/java/ftbsc/geb/GEB.java
index 969045f..0a9a23d 100644
--- a/src/main/java/ftbsc/geb/GEB.java
+++ b/src/main/java/ftbsc/geb/GEB.java
@@ -46,6 +46,8 @@ public class GEB implements IBus {
listener.getClass(),
ConcurrentHashMap.newKeySet()
);
+
+ this.listenerMap.get(listener.getClass()).add(listener);
}
/**
diff --git a/src/main/java/ftbsc/geb/api/IBus.java b/src/main/java/ftbsc/geb/api/IBus.java
index 867bf7a..e3dd4ba 100644
--- a/src/main/java/ftbsc/geb/api/IBus.java
+++ b/src/main/java/ftbsc/geb/api/IBus.java
@@ -21,6 +21,7 @@ public interface IBus {
/**
* Tells you whether a listener is currently registered.
* Ideally this should be efficient.
+ * @param listener the listener to check
* @return true if the listener is registered
*/
boolean isRegistered(IListener listener);