Package valorless.havenbags.hooks
Class Eco
java.lang.Object
valorless.havenbags.hooks.Eco
Handles economy integration for the transmog system.
This class integrates with the Essentials economy plugin to manage costs for applying transmog appearances. Different appearances can have custom prices configured, with a default price for unconfigured transmogs.
Pricing is based on the transmog type and item model, allowing administrators to set higher costs for rare or desirable appearances.
Note: Currently disabled in the codebase but ready for future use.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic BooleancanAfford(org.bukkit.entity.Player player, double price) Checks if a player can afford the transaction.static voidinit()Initializes the economy integration with Essentials.static voidtakeMoney(org.bukkit.entity.Player player, double amount) Deducts money from a player's account.
-
Constructor Details
-
Eco
public Eco()
-
-
Method Details
-
init
public static void init()Initializes the economy integration with Essentials. -
canAfford
Checks if a player can afford the transaction.- Parameters:
player- the player to checkprice- the price of the transaction- Returns:
- true if the player has enough money, false otherwise
-
takeMoney
public static void takeMoney(org.bukkit.entity.Player player, double amount) Deducts money from a player's account.- Parameters:
player- the player to chargeamount- the amount to deduct
-