Package org.sgrewritten.stargate.economy
Interface StargateEconomyAPI
- All Known Implementing Classes:
EconomyManager
,VaultEconomyManager
public interface StargateEconomyAPI
An API describing the economy methods required by Stargate
-
Method Summary
Modifier and TypeMethodDescriptionboolean
chargePlayer
(org.bukkit.OfflinePlayer player, Portal origin, double amount) Charges the given player for using the given portalboolean
refundPlayer
(org.bukkit.OfflinePlayer player, Portal origin, double amount) Refunds a player's payment for using a portalvoid
Sets up economy to make it ready for transactions
-
Method Details
-
setupEconomy
void setupEconomy()Sets up economy to make it ready for transactions -
chargePlayer
Charges the given player for using the given portal- Parameters:
player
-The player to charge
origin
-The portal the player entered from, or null if not portal usage
amount
-The amount to charge the player
- Returns:
True if there were no problems in processing the payment
-
refundPlayer
Refunds a player's payment for using a portal- Parameters:
player
-The player that used a portal
origin
-The portal the player used
amount
-The amount to refund the player
- Returns:
True if the player was successfully refunded
-