EventHandler - Simple
Description
The SimpleEventHandler will process all events synchronously in the current thread.
Dependencies
- Gradle
- Gradle - Kotlin DSL
- Maven
build.gradle
dependencies {
implementation 'com.github.philippheuer.events4j:events4j-handler-simple:0.12.2'
}
build.gradle.kts
dependencies {
implementation("com.github.philippheuer.events4j:events4j-handler-simple:0.12.2")
}
pom.xml
<dependency>
<groupId>com.github.philippheuer.events4j</groupId>
<artifactId>events4j-handler-simple</artifactId>
<version>0.12.2</version>
</dependency>
Set as default in Twitch4J and for eventManager.onEvent
- Java
- Kotlin
- Groovy
ITwitchClient twitchClient = TwitchClientBuilder.builder()
.withDefaultEventHandler(SimpleEventHandler.class)
.build();
val twitchClient = TwitchClientBuilder.builder()
.withDefaultEventHandler(SimpleEventHandler::class.java)
.build();
def twitchClient = TwitchClientBuilder.builder()
.withDefaultEventHandler(SimpleEventHandler)
.build();