Class CallbackEntry

java.lang.Object
net.tnemc.plugincore.core.api.CallbackEntry

public class CallbackEntry extends Object
CallbackEntry represents a class that serves as an entry for a specific callback.
Since:
0.1.2.0
Author:
creatorfromhell
  • Constructor Details

  • Method Details

    • addConsumer

      public void addConsumer(Function<Callback,Boolean> consumer)
      Used to add a consumer for this callback.
      Parameters:
      consumer - The consumer to add for this callback. This is an implementation of the Function interface, which accepts an Callback parameter and returns a boolean value, which indicates if the "event" should be cancelled or not.
    • call

      public boolean call(Callback callback)
      Used to call all the consumers for this callback.
      Parameters:
      callback - The callback class for this consumer.
      Returns:
      This returns a boolean value, which equates to whether this event is cancelled or not.