Package com.griefdefender.api.event
Interface CauseStackManager
public interface CauseStackManager
Manages
EventCause's.-
Method Summary
Modifier and TypeMethodDescriptionGets the currentEventCause.Checks the head cause object of stack.popCause()Pops the last cause off the stack.Pushes a cause onto the stack during an event.
-
Method Details
-
getCurrentCause
EventCause getCurrentCause()Gets the currentEventCause.- Returns:
- The current event cause, or plugin instance if not available.
-
pushCause
Pushes a cause onto the stack during an event. Note: It is important to always callpopCause()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
-