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 voidfilterTargetPositions(Predicate<ServerLocation> predicate) Applies the providedPredicateto theListofScheduleUpdateTickets fromtickets()such that any time thatPredicate.test(Object)returnsfalseon the location of theScheduleUpdateTicket, theScheduleUpdateTicketis marked as "invalid".default voidfilterTickets(Predicate<ScheduleUpdateTicket<T>> predicate) Applies the providedPredicateto theListofScheduleUpdateTickets fromtickets()such that any time thatPredicate.test(Object)returnsfalseon the location of theScheduleUpdateTicket, theScheduleUpdateTicketis marked as "invalid".tickets()Gets a list of theScheduleUpdateTickets for this event.Methods inherited from interface org.spongepowered.api.event.Cancellable
isCancelled, setCancelledMethods inherited from interface org.spongepowered.api.event.GenericEvent
paramType
-
Method Details
-
tickets
List<ScheduleUpdateTicket<T>> tickets()Gets a list of theScheduleUpdateTickets 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 providedPredicateto theListofScheduleUpdateTickets fromtickets()such that any time thatPredicate.test(Object)returnsfalseon the location of theScheduleUpdateTicket, theScheduleUpdateTicketis marked as "invalid".ScheduleUpdateTicket.block()is used to get theServerLocation- Parameters:
predicate- The predicate to use for filtering
-
filterTickets
Applies the providedPredicateto theListofScheduleUpdateTickets fromtickets()such that any time thatPredicate.test(Object)returnsfalseon the location of theScheduleUpdateTicket, theScheduleUpdateTicketis marked as "invalid".- Parameters:
predicate- The predicate to use for filtering
-