Interface ScheduleBlockUpdateEvent<T>
- All Superinterfaces:
Cancellable
,Event
,GenericEvent<T>
Fired when a
scheduled block update
is being proposed to the engine.-
Method Summary
Modifier and TypeMethodDescriptiondefault void
filterTargetPositions
(Predicate<ServerLocation> predicate) Applies the providedPredicate
to theList
ofScheduleUpdateTicket
s fromtickets()
such that any time thatPredicate.test(Object)
returnsfalse
on the location of theScheduleUpdateTicket
, theScheduleUpdateTicket
is marked as "invalid".default void
filterTickets
(Predicate<ScheduleUpdateTicket<T>> predicate) Applies the providedPredicate
to theList
ofScheduleUpdateTicket
s fromtickets()
such that any time thatPredicate.test(Object)
returnsfalse
on the location of theScheduleUpdateTicket
, theScheduleUpdateTicket
is marked as "invalid".tickets()
Gets a list of theScheduleUpdateTicket
s for this event.Methods inherited from interface org.spongepowered.api.event.Cancellable
isCancelled, setCancelled
Methods inherited from interface org.spongepowered.api.event.GenericEvent
paramType
-
Method Details
-
tickets
List<ScheduleUpdateTicket<T>> tickets()Gets a list of theScheduleUpdateTicket
s for this event. If a ticket is requested to be marked as "invalid",ScheduleUpdateTicket.setValid(boolean)
can be used.- Returns:
- The unmodifiable list of tickets
-
filterTargetPositions
Applies the providedPredicate
to theList
ofScheduleUpdateTicket
s fromtickets()
such that any time thatPredicate.test(Object)
returnsfalse
on the location of theScheduleUpdateTicket
, theScheduleUpdateTicket
is marked as "invalid".ScheduleUpdateTicket.block()
is used to get theServerLocation
- Parameters:
predicate
- The predicate to use for filtering
-
filterTickets
Applies the providedPredicate
to theList
ofScheduleUpdateTicket
s fromtickets()
such that any time thatPredicate.test(Object)
returnsfalse
on the location of theScheduleUpdateTicket
, theScheduleUpdateTicket
is marked as "invalid".- Parameters:
predicate
- The predicate to use for filtering
-