Class StargateActivatePortalEvent

java.lang.Object
org.bukkit.event.Event

public class StargateActivatePortalEvent extends StargateEntityPortalEvent
This event should be called whenever a player activates a stargate

Activation of a stargate happens when a player right-clicks the sign of a stargate. This event can be used to overwrite the selected destination, and all destinations the player can see.

  • Constructor Details

    • StargateActivatePortalEvent

      public StargateActivatePortalEvent(@NotNull @NotNull Portal portal, @NotNull @NotNull org.bukkit.entity.Entity entity, @NotNull @NotNull List<String> destinations, String destination)
      Instantiates a new stargate activate event
      Parameters:
      portal -

      The activated portal

      entity -

      The entity activating the portal

      destinations -

      The destinations available to the player using the portal

      destination -

      The currently selected destination

  • Method Details

    • getDestinations

      public List<String> getDestinations()
      Gets the destinations available for the portal
      Returns:

      The destinations available for the portal

    • setDestinations

      public void setDestinations(@NotNull @NotNull List<String> destinations)
      Sets the destinations available to the player using the portal
      Parameters:
      destinations -

      The new list of available destinations

    • getDestination

      public String getDestination()
      Gets the selected destination
      Returns:

      The selected destination

    • setDestination

      public void setDestination(String destination)
      Sets (changes) the selected destination
      Parameters:
      destination -

      The new selected destination

    • 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 class org.bukkit.event.Event