Class DelegateEvents

java.lang.Object
com.sk89q.worldguard.bukkit.event.DelegateEvents

public final class DelegateEvents extends Object
Utility methods for dealing with delegate events.
  • Method Details

    • setSilent

      public static <T extends DelegateEvent> T setSilent(T event)
      Set an event to be silent.
      Type Parameters:
      T - the type of event
      Parameters:
      event - the event
      Returns:
      the same event
    • setSilent

      public static <T extends DelegateEvent> T setSilent(T event, boolean silent)
      Set an event to be silent.
      Type Parameters:
      T - the type of event
      Parameters:
      event - the event
      silent - true to set silent
      Returns:
      the same event
    • setAllowed

      public static <T extends Handleable> T setAllowed(T event, boolean allowed)
      Set an event as handled as Event.Result.ALLOW if allowed is true, otherwise do nothing.
      Type Parameters:
      T - the type of event
      Parameters:
      event - the event
      Returns:
      the same event