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.

  • 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

      @NotNull public @NotNull PortalBuilder getPortalBuilder()
      Returns:

      The portal builder that is going to be used to try and build the portal

    • getGateBuilder

      @NotNull public @NotNull GateBuilder getGateBuilder()
      Returns:

      The gate builder that is going to be used to try and build the portal

    • getPortalName

      @NotNull public @NotNull String getPortalName()
      Returns:

      The name for portal in the portal creation attempt

    • getDestinationName

      @NotNull public @NotNull String getDestinationName()
      The name of the destination, might be empty if no destination was selected
      Returns:

      The name of the destination

    • getNetworkName

      @NotNull public @NotNull String getNetworkName()
      Do note that this network name will be heavily modified from permission checks.
      Returns:

      The initial name of the network

    • getFlagString

      @NotNull public @NotNull String 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 class org.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 interface org.bukkit.event.Cancellable
    • setCancelled

      public void setCancelled(boolean cancelled)
      Specified by:
      setCancelled in interface org.bukkit.event.Cancellable