-
Notifications
You must be signed in to change notification settings - Fork 17
/
ICurrency.java
executable file
·63 lines (53 loc) · 1.27 KB
/
ICurrency.java
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
package com.griefcraft.integration;
import org.bukkit.entity.Player;
public interface ICurrency {
/**
* @return true if a currency is active
*/
public boolean isActive();
/**
* Format money
*
* @param money
* @return
*/
public String format(double money);
/**
* Get the money name (e.g dollars)
*
* @return
*/
public String getMoneyName();
/**
* Get the current balance for a player
*
* @param player
* @return
*/
public double getBalance(Player player);
/**
* Check the player's money to see if they can afford that
* amount of money <b>without</b> going negative.
*
* @param player
* @param money
* @return
*/
public boolean canAfford(Player player, double money);
/**
* Add money to a player's bank account
*
* @param player
* @param money
* @return the balance after modifying the player's account
*/
public double addMoney(Player player, double money);
/**
* Remove money from a player's bank account
*
* @param player
* @param money
* @return the balance after modifying the player's account
*/
public double removeMoney(Player player, double money);
}