Class DelayedEventsHandler

java.lang.Object
com.datdeveloper.datmoddingapi.delayedEvents.DelayedEventsHandler

public class DelayedEventsHandler extends Object
A system for delaying the execution of events until a condition is met

DelayedEvents do not execute in a different thread, rather they on the main server tick after their IDelayedEvent.canExecute() function tests true.

For executing tasks on another thread, see ConcurrentHandler.

For an example of a delayed event, see DelayedTeleportEvent

See Also:
  • Constructor Details

    • DelayedEventsHandler

      public DelayedEventsHandler()
  • Method Details

    • addEvent

      public static void addEvent(IDelayedEvent event)
      Add a DelayedEvent to the Delay Queue
      Parameters:
      event - The event being added to the queue
      See Also:
    • onTick

      public static void onTick(net.minecraftforge.event.TickEvent.ServerTickEvent event)