Skip to content

Commit

Permalink
Add unregister methods to EventLib class
Browse files Browse the repository at this point in the history
  • Loading branch information
jkvn committed Feb 25, 2024
1 parent eb6ad6d commit e36ffcf
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/main/java/at/jkvn/eventlib/EventLib.java
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,14 @@ public static void registerListeners(Listener... allListeners) {
listeners.addAll(Arrays.stream(allListeners).toList());
}

public static void unregisterListener(Listener listener) {
listeners.remove(listener);
}

public static void unregisterListeners(Listener... allListeners) {
listeners.removeAll(Arrays.stream(allListeners).toList());
}

public static void configure(Configuration configuration) {
EventLib.configuration = configuration;
}
Expand Down

0 comments on commit e36ffcf

Please sign in to comment.