Package org.spongepowered.api.event
Interface CompositeEvent<E extends Event>
- All Superinterfaces:
Cancellable
,Event
- All Known Subinterfaces:
InteractBlockEvent.Secondary.Post
,InteractItemEvent.Secondary.Post
- All Known Implementing Classes:
AbstractCompositeEvent
A
CompositeEvent
is an Event
that contains multiple
side effectual Events
, which may have their own side effects
and may be Cancellable
. In some cases, the interactions of this event
may be cancellable as a whole, but are not guaranteed to revert all side
effects on the Game
. The children()
of
this event are ordered in a "best-effort" basis, and may not be guaranteed
to be in any particular order.
Using setCancelled(boolean)
will perform a best effort cancellation
on each of the children events.
-
Method Summary
Methods inherited from interface org.spongepowered.api.event.Cancellable
isCancelled
-
Method Details
-
baseEvent
E baseEvent() -
children
-
event
-
applyTo
-
setCancelled
void setCancelled(boolean cancel) Sets the cancelled state of theEvent
. Cancels this event and all related events capturedchildren()
. Selectively, if individual events are wished to be cancelled, the individual events should be cancelled instead.- Specified by:
setCancelled
in interfaceCancellable
- Parameters:
cancel
- The new cancelled state
-