Interface CauseStackManager


public interface CauseStackManager
Manages EventCause's.
  • Method Details

    • getCurrentCause

      EventCause getCurrentCause()
      Gets the current EventCause.
      Returns:
      The current event cause, or plugin instance if not available.
    • pushCause

      CauseStackManager pushCause(Object cause)
      Pushes a cause onto the stack during an event. Note: It is important to always call popCause() after usage.
      Parameters:
      cause - The cause of event.
      Returns:
      The cause stack manager
    • popCause

      Object popCause()
      Pops the last cause off the stack.
      Returns:
      The cause object removed.
    • peekCause

      Object peekCause()
      Checks the head cause object of stack.
      Returns:
      The head cause object