- All Superinterfaces:
Consumer<InteractionEvent>
- Functional Interface:
- This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.
The InteractionListener interface, implementing this interface creates a standard
representation of the behaviour when an
Examples:
InteractionEvent
is published in the EventBus
Examples:
class MyScript extends Script implements InteractionListener {
//Script functions
@Override
public void onInteraction(InteractionEvent event) {
//Handle interaction event.
System.out.println(event);
}
@Override
public void initialize() {
super.initialize();
super.subscribe(InteractionEvent.class, this);
}
}
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptiondefault void
accept
(InteractionEvent event) void
onInteraction
(InteractionEvent event)
-
Method Details
-
onInteraction
-
accept
- Specified by:
accept
in interfaceConsumer<InteractionEvent>
-