Package dev.satyrn.xpeconomy.api.economy
Interface Account
- All Known Implementing Classes:
PlayerAccount
public interface Account
Represents an economy account. Handles all XP operations.
- Since:
- 1.0-SNAPSHOT
- Author:
- Isabel Maskrey
-
Method Summary
Modifier and TypeMethodDescriptionboolean
deposit
(@NotNull BigDecimal value) Deposits a given amount into the account.@NotNull BigDecimal
Gets the balance on the account.@NotNull BigInteger
Gets the raw experience point value on the account.@NotNull String
getName()
Gets the account owner's name@NotNull UUID
getUUID()
Gets the account owner's player UUID.boolean
has
(@NotNull BigDecimal value) Checks whether the account can withdraw a given amount.@NotNull Account
setBalance
(@NotNull BigDecimal value) Sets the balance on the account.@NotNull Account
setBalance
(@NotNull BigDecimal value, boolean updateXPValue) Sets the balance on the account and optionally updates the player's XP value.@NotNull Account
setBalanceRaw
(@NotNull BigInteger value, boolean updateXPValue) Sets the raw balance value.@NotNull Account
Sets the account owner's name.@NotNull Account
Sets the account owner's player UUID.boolean
withdraw
(@NotNull BigDecimal value) Withdraws a given amount from the account.
-
Method Details
-
getName
Gets the account owner's name- Returns:
- The name of the account owner.
-
setName
Sets the account owner's name.- Parameters:
value
- The new account owner name.- Returns:
- The modified account.
-
getUUID
Gets the account owner's player UUID.- Returns:
- The player UUID of the account owner.
-
setUUID
Sets the account owner's player UUID.- Parameters:
value
- The account owner's UUID.- Returns:
- The account instance.
-
getBalance
Gets the balance on the account.- Returns:
- The account balance.
-
setBalance
Sets the balance on the account.- Parameters:
value
- The new account balance.- Returns:
- The account instance.
-
getBalanceRaw
Gets the raw experience point value on the account.- Returns:
- The raw experience point balance.
-
setBalance
Sets the balance on the account and optionally updates the player's XP value.- Parameters:
value
- The new account balance.updateXPValue
- If true, also updates the player's XP to match.- Returns:
- The account instance.
-
setBalanceRaw
Sets the raw balance value.- Parameters:
value
- The experience point balance.updateXPValue
- If true, also updates the player's XP to match.- Returns:
- The account instance.
-
has
Checks whether the account can withdraw a given amount.- Parameters:
value
- The amount to withdraw.- Returns:
- Whether the account can withdraw a given amount.
-
withdraw
Withdraws a given amount from the account.- Parameters:
value
- The account to withdraw.
-
deposit
Deposits a given amount into the account.- Parameters:
value
- The amount to deposit.
-