Class StargateClosePortalEvent

All Implemented Interfaces:
org.bukkit.event.Cancellable

public class StargateClosePortalEvent extends CancellableStargatePortalEvent
This event should be called whenever a stargate is closed

This event can be used to overwrite whether the stargate should be forced to close, even if it's set as always-on.

  • Nested Class Summary Link icon

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

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

    Constructors
    Constructor
    Description
    StargateClosePortalEvent(@NotNull Portal portal, boolean force)
    Instantiates a new stargate closing event
  • Method Summary Link icon

    Modifier and Type
    Method
    Description
    boolean
    Gets whether to force the stargate to close
    static org.bukkit.event.HandlerList
    Gets a handler-list containing all event handlers
    @NotNull org.bukkit.event.HandlerList
     
    void
    setForce(boolean force)
    Sets whether the stargate should be forced to close

    Methods inherited from class org.sgrewritten.stargate.api.event.portal.CancellableStargatePortalEvent Link icon

    isCancelled, setCancelled

    Methods inherited from class org.sgrewritten.stargate.api.event.portal.StargatePortalEvent Link icon

    getPortal

    Methods inherited from class org.bukkit.event.Event Link icon

    callEvent, getEventName, isAsynchronous

    Methods inherited from class java.lang.Object Link icon

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

    • StargateClosePortalEvent Link icon

      public StargateClosePortalEvent(@NotNull @NotNull Portal portal, boolean force)
      Instantiates a new stargate closing event
      Parameters:
      portal -

      The portal to close

      force -

      Whether to force the gate to close, even if set as always-on

  • Method Details Link icon

    • getForce Link icon

      public boolean getForce()
      Gets whether to force the stargate to close
      Returns:

      Whether to force the stargate to close

    • setForce Link icon

      public void setForce(boolean force)
      Sets whether the stargate should be forced to close
      Parameters:
      force -

      Whether the stargate should be forced to close

    • getHandlerList Link icon

      public static org.bukkit.event.HandlerList getHandlerList()
      Gets a handler-list containing all event handlers
      Returns:

      A handler-list with all event handlers

    • getHandlers Link icon

      @NotNull public @NotNull org.bukkit.event.HandlerList getHandlers()
      Specified by:
      getHandlers in class org.bukkit.event.Event