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 Details

    • getName

      @NotNull @NotNull String getName()
      Gets the account owner's name
      Returns:
      The name of the account owner.
    • setName

      @NotNull @NotNull Account setName(@NotNull @NotNull String value)
      Sets the account owner's name.
      Parameters:
      value - The new account owner name.
      Returns:
      The modified account.
    • getUUID

      @NotNull @NotNull UUID getUUID()
      Gets the account owner's player UUID.
      Returns:
      The player UUID of the account owner.
    • setUUID

      @NotNull @NotNull Account setUUID(@NotNull @NotNull UUID value)
      Sets the account owner's player UUID.
      Parameters:
      value - The account owner's UUID.
      Returns:
      The account instance.
    • getBalance

      @NotNull @NotNull BigDecimal getBalance()
      Gets the balance on the account.
      Returns:
      The account balance.
    • setBalance

      @NotNull @NotNull Account setBalance(@NotNull @NotNull BigDecimal value)
      Sets the balance on the account.
      Parameters:
      value - The new account balance.
      Returns:
      The account instance.
    • getBalanceRaw

      @NotNull @NotNull BigInteger getBalanceRaw()
      Gets the raw experience point value on the account.
      Returns:
      The raw experience point balance.
    • setBalance

      @NotNull @NotNull Account setBalance(@NotNull @NotNull BigDecimal value, boolean updateXPValue)
      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

      @NotNull @NotNull Account setBalanceRaw(@NotNull @NotNull BigInteger value, boolean updateXPValue)
      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

      boolean has(@NotNull @NotNull BigDecimal value)
      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

      boolean withdraw(@NotNull @NotNull BigDecimal value)
      Withdraws a given amount from the account.
      Parameters:
      value - The account to withdraw.
    • deposit

      boolean deposit(@NotNull @NotNull BigDecimal value)
      Deposits a given amount into the account.
      Parameters:
      value - The amount to deposit.