Class StateChangeEvent

java.lang.Object
org.bukkit.event.Event
net.ess3.api.events.StateChangeEvent
All Implemented Interfaces:
Cancellable
Direct Known Subclasses:
NickChangeEvent, StatusChangeEvent

public abstract class StateChangeEvent extends Event implements Cancellable
This handles common boilerplate for events for changes in state. For boolean state, events should extend StatusChangeEvent instead.
  • Constructor Details

    • StateChangeEvent

      public StateChangeEvent(IUser affected, IUser controller)
    • StateChangeEvent

      public StateChangeEvent(boolean isAsync, IUser affected, IUser controller)
  • Method Details

    • getAffected

      public IUser getAffected()
      Get the user who is affected by the state change.
      Returns:
      The user who is affected by the state change.
    • getController

      public IUser getController()
      Get the user who caused the state change.
      Returns:
      The user who caused the state change.
    • isCancelled

      public boolean isCancelled()
      Specified by:
      isCancelled in interface Cancellable
    • setCancelled

      public void setCancelled(boolean cancelled)
      Specified by:
      setCancelled in interface Cancellable