Class StargatePreCreatePortalEvent
java.lang.Object
org.bukkit.event.Event
org.sgrewritten.stargate.api.event.StargatePreCreatePortalEvent
- All Implemented Interfaces:
org.bukkit.event.Cancellable
public class StargatePreCreatePortalEvent
extends org.bukkit.event.Event
implements org.bukkit.event.Cancellable
Is triggered before the StargateCreatePortalEvent
.
-
Nested Class Summary
Nested classes/interfaces inherited from class org.bukkit.event.Event
org.bukkit.event.Event.Result
-
Constructor Summary
ConstructorDescriptionStargatePreCreatePortalEvent
(@NotNull PortalBuilder portalBuilder, @NotNull GateBuilder gateBuilder, @NotNull String[] args, @Nullable org.bukkit.entity.Player player) -
Method Summary
Modifier and TypeMethodDescription@NotNull String
The name of the destination, might be empty if no destination was selected@NotNull String
Note that the resulting flags might heavily be changed from this string.@NotNull GateBuilder
static org.bukkit.event.HandlerList
Gets a handler-list containing all event handlers@NotNull org.bukkit.event.HandlerList
@NotNull String
Do note that this network name will be heavily modified from permission checks.@Nullable org.bukkit.entity.Player
@NotNull PortalBuilder
@NotNull String
boolean
void
setCancelled
(boolean cancelled) Methods inherited from class org.bukkit.event.Event
callEvent, getEventName, isAsynchronous
-
Constructor Details
-
StargatePreCreatePortalEvent
public StargatePreCreatePortalEvent(@NotNull @NotNull PortalBuilder portalBuilder, @NotNull @NotNull GateBuilder gateBuilder, @NotNull @NotNull String[] args, @Nullable @Nullable org.bukkit.entity.Player player) - Parameters:
portalBuilder
-The portal builder that is going to build the portal
gateBuilder
-The gate builder which is going to build the gate
args
-The sign arguments, has to have an length of aat least 4
player
-The player that initiated the event
-
-
Method Details
-
getPortalBuilder
- Returns:
The portal builder that is going to be used to try and build the portal
-
getGateBuilder
- Returns:
The gate builder that is going to be used to try and build the portal
-
getPortalName
- Returns:
The name for portal in the portal creation attempt
-
getDestinationName
The name of the destination, might be empty if no destination was selected- Returns:
The name of the destination
-
getNetworkName
Do note that this network name will be heavily modified from permission checks.- Returns:
The initial name of the network
-
getFlagString
Note that the resulting flags might heavily be changed from this string. Any string matching the pattern (\{.*?\}) will be ignored, but can be used for addons as flag arguments.- Returns:
The initial string representing flags
-
getPlayer
@Nullable public @Nullable org.bukkit.entity.Player getPlayer()- Returns:
The player that initiated the event
-
getHandlers
@NotNull public @NotNull org.bukkit.event.HandlerList getHandlers()- Specified by:
getHandlers
in classorg.bukkit.event.Event
-
getHandlerList
public static org.bukkit.event.HandlerList getHandlerList()Gets a handler-list containing all event handlers- Returns:
A handler-list with all event handlers
-
isCancelled
public boolean isCancelled()- Specified by:
isCancelled
in interfaceorg.bukkit.event.Cancellable
-
setCancelled
public void setCancelled(boolean cancelled) - Specified by:
setCancelled
in interfaceorg.bukkit.event.Cancellable
-