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
ConstructorDescriptionStargateClosePortalEvent
(@NotNull Portal portal, boolean force) Instantiates a new stargate closing event -
Method Summary
Modifier and TypeMethodDescriptionboolean
getForce()
Gets whether to force the stargate to closestatic 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 closeMethods 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
-
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:
getHandlers
in classorg.bukkit.event.Event
-