Interface Economy

All Superinterfaces:
Manager, ShutDownable, Startable, Toggleable
All Known Implementing Classes:
DisabledEconomy, VaultEconomy

public interface Economy extends Manager, Toggleable

Economy

This interface represents economy manager that has operations with server's economy, like taking, giving and getting player's money.
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
    depositMoney(@NotNull org.bukkit.OfflinePlayer offlinePlayer, @NotNull Number money)
    Deposits money to player for some reason, examples: gets world liked, some player bought in his world.
    @NotNull Number
    getBalance(org.bukkit.OfflinePlayer offlinePlayer)
    Returns an amount of money that player has currently on his balance.
    boolean
    withdrawMoney(@NotNull org.bukkit.OfflinePlayer offlinePlayer, @NotNull Number money)
    Takes money from player balance, examples: buys something in world.

    Methods inherited from interface Manager

    getName
    Modifier and Type
    Method
    Description
    @NotNull String
    Returns name of manager, that will be displayed by request in the logs.

    Methods inherited from interface ShutDownable

    shutdown
    Modifier and Type
    Method
    Description
    void
    Does tasks on shutdown.

    Methods inherited from interface Startable

    start
    Modifier and Type
    Method
    Description
    void
    Does tasks on start.

    Methods inherited from interface Toggleable

    isWorking
    Modifier and Type
    Method
    Description
    boolean
    Checks whether manager was started successfully and it currently works.
  • Method Details

    • depositMoney

      boolean depositMoney(@NotNull @NotNull org.bukkit.OfflinePlayer offlinePlayer, @NotNull @NotNull Number money)
      Deposits money to player for some reason, examples: gets world liked, some player bought in his world.
      Parameters:
      offlinePlayer - Player to give money.
      money - Amount of money to give.
      Returns:
      true - if successfully taken, false - failed.
    • withdrawMoney

      boolean withdrawMoney(@NotNull @NotNull org.bukkit.OfflinePlayer offlinePlayer, @NotNull @NotNull Number money)
      Takes money from player balance, examples: buys something in world.
      Parameters:
      offlinePlayer - Player to take his money.
      money - Amount of money to take.
      Returns:
      true - if successfully taken, false - failed.
    • getBalance

      @NotNull @NotNull Number getBalance(org.bukkit.OfflinePlayer offlinePlayer)
      Returns an amount of money that player has currently on his balance.
      Parameters:
      offlinePlayer - Player to check balance.
      Returns:
      Amount of money on player's balance.