forType

fun <T : Event, V> forType(name: String, filter: EventFilter<T, V>): EventNode<T>

Creates a new event node that accepts any event of the given event type T that passes the given filter.

For example, you could create an event node that only accepts entity events:

Java:

final EventNode<PlayerEvent> playerNode = EventNode.forType("abc", EventFilter.PLAYER);

Kotlin:

val playerNode = EventNode.forType("abc", EventFilter.PLAYER)

Return

a new event node

Parameters

T

the event type

V

the value type

name

the name of the node

filter

the event filter