Class StargatePlayerDestroyPortalEvent


public class StargatePlayerDestroyPortalEvent extends DeniableStargatePortalEvent
This event should be called whenever a stargate is destroyed

This event can be used to deny or change the cost of a stargate destruction.

  • Constructor Details

    • StargatePlayerDestroyPortalEvent

      public StargatePlayerDestroyPortalEvent(@NotNull @NotNull Portal portal, @NotNull @NotNull org.bukkit.entity.Player player, boolean deny, String denyReason, double cost)
      Instantiates a new Stargate Destroy Event
      Parameters:
      portal -

      The destroyed portal

      player -

      The player destroying the portal

      deny -

      Whether the event should be denied (cancelled)

      denyReason -

      The message to display if the event is denied

      cost -

      The cost of destroying the portal

  • Method Details

    • getCost

      public double getCost()
      Gets the cost of destroying the portal
      Returns:

      The cost of destroying the portal

    • setCost

      public void setCost(double cost)
      Sets the cost of destroying the portal
      Parameters:
      cost -

      The cost of destroying the portal

    • 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