Interface XPrisonCurrency
- All Known Subinterfaces:
XPrisonGemsAPI
,XPrisonTokensAPI
public interface XPrisonCurrency
Represents a generic currency system in the XPrison API.
This interface abstracts common currency operations such as querying,
adding, removing, and setting amounts for players.
Implementations could represent different currency types like Tokens, Gems, etc.
-
Method Summary
Modifier and TypeMethodDescriptionvoid
add
(org.bukkit.OfflinePlayer player, long amount, ReceiveCause cause) Adds a specified amount of currency to the player's balance.long
getAmount
(org.bukkit.OfflinePlayer player) Gets the current amount of this currency for the specified player.void
Removes a specified amount of currency from the player's balance.void
set
(org.bukkit.OfflinePlayer player, long amount) Sets the player's currency balance to a new specified amount.
-
Method Details
-
getAmount
long getAmount(org.bukkit.OfflinePlayer player) Gets the current amount of this currency for the specified player.- Parameters:
player
- The player (offline or online) whose balance to retrieve.- Returns:
- The amount of currency the player currently has.
-
set
void set(org.bukkit.OfflinePlayer player, long amount) Sets the player's currency balance to a new specified amount.- Parameters:
player
- The player whose balance to set.amount
- The new amount to set.
-