Class StargateAccessPortalEvent
java.lang.Object
org.bukkit.event.Event
org.sgrewritten.stargate.api.event.portal.StargatePortalEvent
org.sgrewritten.stargate.api.event.portal.StargateEntityPortalEvent
org.sgrewritten.stargate.api.event.portal.DeniableStargatePortalEvent
org.sgrewritten.stargate.api.event.portal.StargateAccessPortalEvent
This event should be called whenever a player attempts to access a stargate
This event is triggered whenever a player enters or activates a stargate. This event can be used to override whether the player should be allowed to access the stargate.
-
Nested Class Summary
Nested classes/interfaces inherited from class org.bukkit.event.Event
org.bukkit.event.Event.Result
-
Constructor Summary
ConstructorDescriptionStargateAccessPortalEvent
(org.bukkit.entity.Entity travellingEntity, Portal portal, boolean deny, String denyReason) Instantiates a new stargate access event -
Method Summary
Modifier and TypeMethodDescriptionstatic org.bukkit.event.HandlerList
Gets a handler-list containing all event handlers@NotNull org.bukkit.event.HandlerList
Methods inherited from class org.sgrewritten.stargate.api.event.portal.DeniableStargatePortalEvent
getDeny, getDenyReason, setDeny, setDenyReason
Methods inherited from class org.sgrewritten.stargate.api.event.portal.StargateEntityPortalEvent
getEntity
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
-
StargateAccessPortalEvent
public StargateAccessPortalEvent(org.bukkit.entity.Entity travellingEntity, Portal portal, boolean deny, String denyReason) Instantiates a new stargate access event- Parameters:
travellingEntity
-The entity travelling through a portal
portal
-The portal involved in the event
deny
-Whether the stargate access should be denied
denyReason
-The reason stargate access was denied
-
-
Method Details
-
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
-