public final class EventHandlers
extends Object
Defines standard event predicates for use in functional event handlers.
-
Constructor Summary
Constructors
-
Method Summary
static <T extends org.bukkit.event.Cancellable>
@NotNull Consumer<T>
Returns a consumer which cancels the event
static <T extends org.bukkit.event.Cancellable>
@NotNull Consumer<T>
Returns a consumer which un-cancels the event
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Constructor Details
-
EventHandlers
public EventHandlers()
-
Method Details
-
cancel
@NotNull
public static <T extends org.bukkit.event.Cancellable>
@NotNull Consumer<T> cancel()
Returns a consumer which cancels the event
- Type Parameters:
T - the event type
- Returns:
- a consumer which cancels the event
-
uncancel
@NotNull
public static <T extends org.bukkit.event.Cancellable>
@NotNull Consumer<T> uncancel()
Returns a consumer which un-cancels the event
- Type Parameters:
T - the event type
- Returns:
- a consumer which un-cancels the event