Package com.ranull.graves.event
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
-
Nested Class Summary
Nested classes/interfaces inherited from class org.bukkit.event.Event
org.bukkit.event.Event.Result
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate double
The amount of currency to be deducted from the player's balance in the event.private static final org.bukkit.event.HandlerList
A static final instance ofHandlerList
used to manage event handlers. -
Constructor Summary
ConstructorsConstructorDescriptionGraveEconomyEvent
(Grave grave, @NotNull org.bukkit.entity.Player player) Constructs a newGraveEconomyEvent
. -
Method Summary
Modifier and TypeMethodDescriptiondouble
Gets the amount of money or percentage to be deducted from the player's balance.static @NotNull org.bukkit.event.HandlerList
Gets the list of handlers for this event.@NotNull org.bukkit.event.HandlerList
Gets the list of handlers for this event.void
setEconomyAmount
(double economyAmount) Sets the amount of money or percentage to be deducted from the player's balance.Methods inherited from class com.ranull.graves.event.GraveEvent
getBlock, getBlockExp, getBlockType, getEntity, getEntityCustomName, getEntityName, getEntityType, getEntityUniqueId, getGrave, getGraveExperience, getGraveOwnerDisplayName, getGraveOwnerName, getGraveOwnerNameDisplay, getGraveOwnerTexture, getGraveOwnerTextureSignature, getGraveOwnerUniqueId, getGraveUUID, getInventoryView, getLivingEntity, getLivingEntityKiller, getLivingEntityKillerName, getLivingEntityKillerType, getLivingEntityKillerUniqueId, getLivingEntityVictim, getLivingEntityVictimId, getLivingEntityVictimType, getLocation, getPlayer, getPlayerDisplayName, getPlayerName, getPlayerUniqueId, getTargetEntity, isAddon, isCancelled, isDropItems, setAddon, setBlockExp, setCancelled, setDropItems, setLocation
Methods inherited from class org.bukkit.event.Event
getEventName, isAsynchronous
-
Field Details
-
HANDLERS
private static final org.bukkit.event.HandlerList HANDLERSA static final instance ofHandlerList
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 economyAmountThe amount of currency to be deducted from the player's balance in the event. This value is represented as aDouble
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
Constructs a newGraveEconomyEvent
.- 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 classGraveEvent
- Returns:
- The handler list for this event.
-