Class EventDelay

java.lang.Object
org.polyfrost.oneconfig.api.event.v1.EventDelay

public final class EventDelay extends Object
  • Method Details

    • of

      public static <E extends Event> void of(Class<E> cls, int polls, Consumer<E> function)
      Schedules a Consumer to be called after a certain amount polls from the given event.

      If the amount of polls is below 1, the Consumer will be called immediately, with the event being null.

    • of

      public static <E extends Event> void of(Class<E> cls, int polls, Runnable function)
      of(Class, int, Consumer) with a Runnable.
    • tick

      public static void tick(int ticks, Runnable function)
      of(Class, int, Runnable) with TickEvent.End.