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 Summary
Nested classes/interfaces inherited from class org.bukkit.event.Event
org.bukkit.event.Event.Result -
Constructor Summary
ConstructorsConstructorDescriptionStargateClosePortalEvent(@NotNull Portal portal, boolean force) Instantiates a new stargate closing event -
Method Summary
Modifier 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.CancellableStargatePortalEvent
isCancelled, setCancelledMethods inherited from class org.sgrewritten.stargate.api.event.portal.StargatePortalEvent
getPortalMethods inherited from class org.bukkit.event.Event
callEvent, getEventName, isAsynchronous
-
Constructor Details
-
StargateClosePortalEvent
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:
getHandlersin classorg.bukkit.event.Event
-