Class GraveEconomyEvent

java.lang.Object
org.bukkit.event.Event
com.ranull.graves.event.GraveEvent
com.ranull.graves.event.GraveEconomyEvent
All Implemented Interfaces:
Addon, org.bukkit.event.Cancellable

public class GraveEconomyEvent extends GraveEvent
  • Field Details

    • HANDLERS

      private static final org.bukkit.event.HandlerList HANDLERS
      A static final instance of HandlerList used to manage event handlers.

      This HandlerList is used to register and manage the handlers for events of this type. It provides the mechanism for adding, removing, and invoking event handlers.

    • economyAmount

      private double economyAmount
      The amount of currency to be deducted from the player's balance in the event. This value is represented as a Double and can either be a fixed amount or a percentage of the player's balance, depending on the configuration.

      The economy amount is used during the grave economy process to determine how much money should be withdrawn from the player's account.

  • Constructor Details

    • GraveEconomyEvent

      public GraveEconomyEvent(Grave grave, @NotNull @NotNull org.bukkit.entity.Player player)
      Constructs a new GraveEconomyEvent.
      Parameters:
      grave - The grave associated with the event.
      player - The player associated with the event, if any.
  • Method Details

    • getEconomyAmount

      public double getEconomyAmount()
      Gets the amount of money or percentage to be deducted from the player's balance. This value represents the economy amount that will be deducted as part of the grave economy event, and can either be a fixed amount or a percentage of the player's balance, depending on configuration.
      Returns:
      the amount (in currency) or percentage to be deducted from the player's balance.
    • setEconomyAmount

      public void setEconomyAmount(double economyAmount)
      Sets the amount of money or percentage to be deducted from the player's balance. This value defines how much money will be deducted, which could either be a fixed amount or a percentage of the player's balance. The deduction amount is applied during the grave economy process based on the configuration.
      Parameters:
      economyAmount - the new amount (in currency) or percentage to be deducted.
    • getHandlerList

      @NotNull public static @NotNull org.bukkit.event.HandlerList getHandlerList()
      Gets the list of handlers for this event.
      Returns:
      The handler list for this event.
    • getHandlers

      @NotNull public @NotNull org.bukkit.event.HandlerList getHandlers()
      Gets the list of handlers for this event.
      Overrides:
      getHandlers in class GraveEvent
      Returns:
      The handler list for this event.