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

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

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

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

    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

    isCancelled, setCancelled

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

    getPortal

    Methods inherited from class org.bukkit.event.Event

    callEvent, getEventName, isAsynchronous

    Methods inherited from class java.lang.Object

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

    • StargateClosePortalEvent

      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

    • getForce

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

      Whether to force the stargate to close

    • setForce

      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

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

      A handler-list with all event handlers

    • getHandlers

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