Class StargateOpenPortalEvent

All Implemented Interfaces:
org.bukkit.event.Cancellable

public class StargateOpenPortalEvent extends StargateEntityPortalEvent implements org.bukkit.event.Cancellable
This event should be called whenever a player opens a stargate

This event can be used to overwrite whether the stargate should be forced to open, even if it's already open.

  • Constructor Details

    • StargateOpenPortalEvent

      public StargateOpenPortalEvent(org.bukkit.entity.Player player, @NotNull @NotNull Portal portal, @Nullable @Nullable Portal destination, boolean cancelled, boolean force)
      Instantiates a new stargate open event
      Parameters:
      player -

      The player opening the stargate

      portal -

      The opened portal

      force -

      Whether to force the portal open

  • Method Details

    • getForce

      public boolean getForce()
      Gets whether the portal should be forced open
      Returns:

      Whether the portal should be forced open

    • setForce

      public void setForce(boolean force)
      Sets whether the portal should be forced open
      Parameters:
      force -

      Whether the portal should be forced open

    • 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
    • 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
    • getDestination

      @Nullable public @Nullable Portal getDestination()
    • setDestination

      public void setDestination(Portal destination)