Class Events
java.lang.Object
com.thecsdev.common.event.Events
-
Method Summary
Modifier and TypeMethodDescriptionstatic final <L> @NotNull Event<L> createLoop(@NotNull Class<L> listenerType) Creates a newEventinstance with the specified listener type.static final <L> @NotNull Event<L> createLoop(L... typeGetter) Creates a newEventinstance with the specified listener type.
-
Method Details
-
createLoop
@SafeVarargs @NotNull public static final <L> @NotNull Event<L> createLoop(@NotNull L... typeGetter) Creates a newEventinstance with the specified listener type.- Type Parameters:
L- Listener type.- Parameters:
typeGetter- An empty array of the listener type, used to infer the listener type.- Returns:
- A new
Eventinstance with the specified listener type. - Throws:
NullPointerException- If the argument isnull.IllegalArgumentException- If the argument is not an empty array.
-
createLoop
@NotNull public static final <L> @NotNull Event<L> createLoop(@NotNull @NotNull Class<L> listenerType) Creates a newEventinstance with the specified listener type.- Type Parameters:
L- Listener type.- Parameters:
listenerType- The class of the listener type.- Returns:
- A new
Eventinstance with the specified listener type. - Throws:
NullPointerException- If the argument isnull.
-