Class StargateClosePortalEvent
java.lang.Object
org.bukkit.event.Event
org.sgrewritten.stargate.api.event.portal.StargatePortalEvent
org.sgrewritten.stargate.api.event.portal.CancellableStargatePortalEvent
org.sgrewritten.stargate.api.event.portal.StargateClosePortalEvent
- All Implemented Interfaces:
- org.bukkit.event.Cancellable
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 SummaryNested classes/interfaces inherited from class org.bukkit.event.Eventorg.bukkit.event.Event.Result
- 
Constructor SummaryConstructorsConstructorDescriptionStargateClosePortalEvent(@NotNull Portal portal, boolean force) Instantiates a new stargate closing event
- 
Method SummaryModifier and TypeMethodDescriptionbooleangetForce()Gets whether to force the stargate to closestatic org.bukkit.event.HandlerListGets a handler-list containing all event handlers@NotNull org.bukkit.event.HandlerListvoidsetForce(boolean force) Sets whether the stargate should be forced to closeMethods inherited from class org.sgrewritten.stargate.api.event.portal.CancellableStargatePortalEventisCancelled, setCancelledMethods inherited from class org.sgrewritten.stargate.api.event.portal.StargatePortalEventgetPortalMethods inherited from class org.bukkit.event.EventcallEvent, getEventName, isAsynchronous
- 
Constructor Details- 
StargateClosePortalEventInstantiates 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- 
getForcepublic boolean getForce()Gets whether to force the stargate to close- Returns:
- Whether to force the stargate to close 
 
- 
setForcepublic void setForce(boolean force) Sets whether the stargate should be forced to close- Parameters:
- force-- Whether the stargate should be forced to close 
 
- 
getHandlerListpublic 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:
- getHandlersin class- org.bukkit.event.Event
 
 
-