Interface IDelayedEvent

All Known Implementing Classes:
DelayedTeleportEvent, TimeDelayedEvent

public interface IDelayedEvent
The base interface for Delayed events
See Also:
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
    The check to ensure the conditions are correct for the Delayed Event to execute
    void
    The code that will execute when the delay has passed
    boolean
    shouldRequeue(boolean hasFinished)
    Checks to see if the code should be requeued to continue waiting to be executed Can be used to restart the delay for the event
  • Method Details

    • execute

      void execute()
      The code that will execute when the delay has passed
    • canExecute

      boolean canExecute()
      The check to ensure the conditions are correct for the Delayed Event to execute
      Returns:
      True if the conditions are right to execute this delayed event
    • shouldRequeue

      boolean shouldRequeue(boolean hasFinished)
      Checks to see if the code should be requeued to continue waiting to be executed Can be used to restart the delay for the event
      Parameters:
      hasFinished - True if the event has executed
      Returns:
      True if the event should be requeued