Package org.spongepowered.api.scheduler
Interface ScheduledUpdateList<T>
-
- Type Parameters:
T
- The type of update objects that are being scheduled
public interface ScheduledUpdateList<T>
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description boolean
isScheduled(int x, int y, int z, T target)
default boolean
isScheduled(Vector3i pos, T target)
Gets whether there's a scheduled update at the desired position with the provided target.default ScheduledUpdate<T>
schedule(int x, int y, int z, T target, int delay, TemporalUnit temporalUnit)
Schedules a new update for the desired targetdefault ScheduledUpdate<T>
schedule(int x, int y, int z, T target, int delay, TemporalUnit temporalUnit, DefaultedRegistryReference<? extends TaskPriority> priority)
default ScheduledUpdate<T>
schedule(int x, int y, int z, T target, int delay, TemporalUnit temporalUnit, TaskPriority priority)
default ScheduledUpdate<T>
schedule(int x, int y, int z, T target, Duration delay)
default ScheduledUpdate<T>
schedule(int x, int y, int z, T target, Duration delay, DefaultedRegistryReference<? extends TaskPriority> priority)
ScheduledUpdate<T>
schedule(int x, int y, int z, T target, Duration delay, TaskPriority priority)
default ScheduledUpdate<T>
schedule(int x, int y, int z, T target, Ticks delay)
default ScheduledUpdate<T>
schedule(int x, int y, int z, T target, Ticks ticks, DefaultedRegistryReference<? extends TaskPriority> priority)
ScheduledUpdate<T>
schedule(int x, int y, int z, T target, Ticks delay, TaskPriority priority)
Schedules a new update at the desired position after the specified number ofTicks
.default ScheduledUpdate<T>
schedule(Vector3i pos, T target, int delay, TemporalUnit temporalUnit)
Schedules a new update at the desired position with the provided delay.default ScheduledUpdate<T>
schedule(Vector3i pos, T target, int delay, TemporalUnit temporalUnit, DefaultedRegistryReference<? extends TaskPriority> priority)
default ScheduledUpdate<T>
schedule(Vector3i pos, T target, int delay, TemporalUnit temporalUnit, TaskPriority priority)
default ScheduledUpdate<T>
schedule(Vector3i pos, T target, Duration delay)
Schedules a new update with the givenT object
for a desiredDuration
default ScheduledUpdate<T>
schedule(Vector3i pos, T target, Duration delay, DefaultedRegistryReference<? extends TaskPriority> priority)
default ScheduledUpdate<T>
schedule(Vector3i pos, T target, Duration delay, TaskPriority priority)
default ScheduledUpdate<T>
schedule(Vector3i pos, T target, Ticks delay)
default ScheduledUpdate<T>
schedule(Vector3i pos, T target, Ticks delay, TaskPriority priority)
Collection<? extends ScheduledUpdate<T>>
scheduledAt(int x, int y, int z)
Gets a collection of scheduled updates at the desired position.default Collection<? extends ScheduledUpdate<T>>
scheduledAt(Vector3i pos)
-
-
-
Method Detail
-
schedule
default ScheduledUpdate<T> schedule(Vector3i pos, T target, int delay, TemporalUnit temporalUnit)
Schedules a new update at the desired position with the provided delay.- Parameters:
pos
- The positiontarget
- The targetdelay
- The delaytemporalUnit
- The unit of the delay- Returns:
- The scheduled update
-
schedule
default ScheduledUpdate<T> schedule(Vector3i pos, T target, Duration delay)
Schedules a new update with the givenT object
for a desiredDuration
- Parameters:
pos
- The positiontarget
- The targetdelay
- The delay with a duration- Returns:
- The scheduled update
-
schedule
default ScheduledUpdate<T> schedule(int x, int y, int z, T target, int delay, TemporalUnit temporalUnit)
Schedules a new update for the desired target- Parameters:
x
- The x coordinatey
- The y coordinatez
- The z coordinatetarget
- The target objectdelay
- The delaytemporalUnit
- The unit of time- Returns:
- The scheduled update
-
schedule
default ScheduledUpdate<T> schedule(int x, int y, int z, T target, Duration delay)
- Parameters:
x
- The x coordinatey
- The y coordinatez
- The z coordinatetarget
- The targetdelay
- The delay- Returns:
- The scheduled update
-
schedule
default ScheduledUpdate<T> schedule(Vector3i pos, T target, int delay, TemporalUnit temporalUnit, TaskPriority priority)
- Parameters:
pos
- The positiontarget
- The targetdelay
- The delaytemporalUnit
- The unit of timepriority
- The priority of the scheduled update- Returns:
- The scheduled update
-
schedule
default ScheduledUpdate<T> schedule(Vector3i pos, T target, int delay, TemporalUnit temporalUnit, DefaultedRegistryReference<? extends TaskPriority> priority)
- Parameters:
pos
- The positiontarget
- The targetdelay
- The delaytemporalUnit
- The unit of timepriority
- The priority of the scheduled update- Returns:
- The scheduled update
-
schedule
default ScheduledUpdate<T> schedule(Vector3i pos, T target, Duration delay, TaskPriority priority)
- Parameters:
pos
- The positiontarget
- The targetdelay
- The delaypriority
- The priority of the scheduled update- Returns:
- The scheduled update
-
schedule
default ScheduledUpdate<T> schedule(Vector3i pos, T target, Duration delay, DefaultedRegistryReference<? extends TaskPriority> priority)
- Parameters:
pos
- The positiontarget
- The targetdelay
- The delaypriority
- The priority of the scheduled update- Returns:
- The scheduled update
-
schedule
default ScheduledUpdate<T> schedule(int x, int y, int z, T target, int delay, TemporalUnit temporalUnit, TaskPriority priority)
- Parameters:
x
- The x coordinatey
- The y coordinatez
- The z coordinatetarget
- The targetdelay
- The delaytemporalUnit
- The unit of timepriority
- The priority of the scheduled update- Returns:
- The scheduled update
-
schedule
default ScheduledUpdate<T> schedule(int x, int y, int z, T target, int delay, TemporalUnit temporalUnit, DefaultedRegistryReference<? extends TaskPriority> priority)
- Parameters:
x
- The x coordinatey
- The y coordinatez
- The z coordinatetarget
- The targetdelay
- The delaytemporalUnit
- The unit of timepriority
- The priority of the scheduled update- Returns:
- The scheduled update
-
schedule
ScheduledUpdate<T> schedule(int x, int y, int z, T target, Duration delay, TaskPriority priority)
- Parameters:
x
- The x coordinatey
- The y coordinatez
- The z coordinatetarget
- The targetdelay
- The delaypriority
- The priority of the scheduled update- Returns:
- The scheduled update
-
schedule
default ScheduledUpdate<T> schedule(int x, int y, int z, T target, Ticks ticks, DefaultedRegistryReference<? extends TaskPriority> priority)
- Parameters:
x
- The x coordinatey
- The y coordinatez
- The z coordinatetarget
- The targetticks
- The delay, inTicks
priority
- The priority of the scheduled update- Returns:
- The scheduled update
-
schedule
default ScheduledUpdate<T> schedule(int x, int y, int z, T target, Ticks delay)
- Parameters:
x
- The x coordinatey
- The y coordinatez
- The z coordinatetarget
- The targetdelay
- The delay- Returns:
- The scheduled update
-
schedule
default ScheduledUpdate<T> schedule(Vector3i pos, T target, Ticks delay)
- Parameters:
pos
- The positiontarget
- The targetdelay
- The delay- Returns:
- The scheduled update
-
schedule
default ScheduledUpdate<T> schedule(Vector3i pos, T target, Ticks delay, TaskPriority priority)
- Parameters:
pos
- The positiontarget
- The targetdelay
- The delaypriority
- The priority of the scheduled update- Returns:
- The scheduled update
-
schedule
default ScheduledUpdate<T> schedule(int x, int y, int z, T target, Duration delay, DefaultedRegistryReference<? extends TaskPriority> priority)
- Parameters:
x
- The x coordinatey
- The y coordinatez
- The z coordinatetarget
- The targetdelay
- The delaypriority
- The priority of the scheduled update- Returns:
- The scheduled update
-
schedule
ScheduledUpdate<T> schedule(int x, int y, int z, T target, Ticks delay, TaskPriority priority)
Schedules a new update at the desired position after the specified number ofTicks
.- Parameters:
x
- The x coordinatey
- The y coordinatez
- The z coordinatetarget
- The targetdelay
- The delay, inTicks
priority
- The priority of the scheduled update- Returns:
- The scheduled update
-
isScheduled
default boolean isScheduled(Vector3i pos, T target)
Gets whether there's a scheduled update at the desired position with the provided target.- Parameters:
pos
- The positiontarget
- The target- Returns:
- True if there's an update scheduled
-
isScheduled
boolean isScheduled(int x, int y, int z, T target)
- Parameters:
x
- The x coordinatey
- The y coordinatez
- The z coordinatetarget
- The target- Returns:
- True if there's an update scheduled
-
scheduledAt
default Collection<? extends ScheduledUpdate<T>> scheduledAt(Vector3i pos)
- Parameters:
pos
- The position- Returns:
- The collection of scheduled updates at the desired position
-
scheduledAt
Collection<? extends ScheduledUpdate<T>> scheduledAt(int x, int y, int z)
Gets a collection of scheduled updates at the desired position. There is no guarantee- Parameters:
x
- The x coordinatey
- The y coordinatez
- The z coordinate- Returns:
- The collection of scheduled updates at the desired position
-
-