Class GangLeaveEvent

All Implemented Interfaces:
org.bukkit.event.Cancellable

public final class GangLeaveEvent extends XPrisonPlayerEvent implements org.bukkit.event.Cancellable
Event that is fired when a player leaves a gang. This can be due to a voluntary departure, kick, disband, or other GangLeaveReasons.

This event is Cancellable, allowing plugins to prevent the player from leaving.

  • Nested Class Summary

    Nested classes/interfaces inherited from class org.bukkit.event.Event

    org.bukkit.event.Event.Result
  • Constructor Summary

    Constructors
    Constructor
    Description
    GangLeaveEvent(org.bukkit.OfflinePlayer player, Gang gang, GangLeaveReason leaveReason)
    Constructs a new GangLeaveEvent.
  • Method Summary

    Modifier and Type
    Method
    Description
    static org.bukkit.event.HandlerList
    Gets the static handler list for this event.
    org.bukkit.event.HandlerList
    Gets the list of handlers for this event instance.
    boolean
    Checks whether the event has been cancelled.
    void
    setCancelled(boolean cancel)
    Sets whether the event should be cancelled.

    Methods inherited from class org.bukkit.event.Event

    getEventName, isAsynchronous

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • GangLeaveEvent

      public GangLeaveEvent(org.bukkit.OfflinePlayer player, Gang gang, GangLeaveReason leaveReason)
      Constructs a new GangLeaveEvent.
      Parameters:
      player - the OfflinePlayer who is leaving the gang
      gang - the Gang being left
      leaveReason - the GangLeaveReason explaining why the player is leaving
  • Method Details

    • getHandlerList

      public static org.bukkit.event.HandlerList getHandlerList()
      Gets the static handler list for this event.
      Returns:
      the HandlerList
    • isCancelled

      public boolean isCancelled()
      Checks whether the event has been cancelled.
      Specified by:
      isCancelled in interface org.bukkit.event.Cancellable
      Returns:
      true if cancelled, false otherwise
    • setCancelled

      public void setCancelled(boolean cancel)
      Sets whether the event should be cancelled.
      Specified by:
      setCancelled in interface org.bukkit.event.Cancellable
      Parameters:
      cancel - true to cancel the event
    • getHandlers

      public org.bukkit.event.HandlerList getHandlers()
      Gets the list of handlers for this event instance.
      Specified by:
      getHandlers in class org.bukkit.event.Event
      Returns:
      the HandlerList