-
Notifications
You must be signed in to change notification settings - Fork 25
Expand file tree
/
Copy pathAPI.java
More file actions
84 lines (57 loc) · 2.85 KB
/
API.java
File metadata and controls
84 lines (57 loc) · 2.85 KB
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
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
package regalowl.hyperconomy.api;
import java.util.ArrayList;
import java.util.UUID;
import org.bukkit.entity.Player;
import org.bukkit.inventory.ItemStack;
import regalowl.hyperconomy.account.HyperPlayer;
import regalowl.hyperconomy.inventory.HInventory;
import regalowl.hyperconomy.inventory.HItemStack;
import regalowl.hyperconomy.minecraft.HItem;
import regalowl.hyperconomy.shop.PlayerShop;
import regalowl.hyperconomy.shop.ServerShop;
import regalowl.hyperconomy.shop.Shop;
import regalowl.hyperconomy.tradeobject.EnchantmentClass;
import regalowl.hyperconomy.tradeobject.TradeObject;
import regalowl.hyperconomy.transaction.TransactionResponse;
public interface API {
String getDefaultServerShopAccountName();
Shop getShop(String name);
ServerShop getServerShop(String name);
PlayerShop getPlayerShop(String name);
ArrayList<String> getServerShopList();
ArrayList<String> getPlayerShopList();
HyperPlayer getHyperPlayer(String name);
HyperPlayer getHyperPlayer(UUID uuid);
boolean hyperPlayerExists(String name);
boolean hyperPlayerExists(UUID uuid);
HyperPlayer createHyperPlayer(String name);
/**
* @param player (name of player)
* @return true if the hash matches the player's hash and false if it doesn't
*/
boolean checkHash(String player, String hash);
/**
* @param player (name of player)
* @return The random hash for the specified player. If the player is not in the HyperConomy database it returns ""
*/
String getSalt(String player);
boolean isItemDisplay(HItem item);
EnchantmentClass getEnchantmentClass(HItemStack stack);
TradeObject getHyperObject(String name, String economy);
TradeObject getHyperObject(String name, String economy, Shop s);
TradeObject getHyperObject(HItemStack stack, String economy);
TradeObject getHyperObject(HItemStack stack, String economy, Shop s);
ArrayList<TradeObject> getEnchantmentHyperObjects(HItemStack stack, String player);
ArrayList<TradeObject> getAvailableObjects(String shopname);
ArrayList<TradeObject> getAvailableObjects(String shopname, int startingPosition, int limit);
ArrayList<TradeObject> getAvailableObjects(HyperPlayer p);
ArrayList<TradeObject> getAvailableObjects(HyperPlayer p, int startingPosition, int limit);
TransactionResponse buy(HyperPlayer p, TradeObject o, int amount);
TransactionResponse buy(HyperPlayer p, TradeObject o, int amount, Shop shop);
TransactionResponse sell(HyperPlayer p, TradeObject o, int amount);
TransactionResponse sell(HyperPlayer p, TradeObject o, int amount, Shop shop);
TransactionResponse sellAll(HyperPlayer p);
TransactionResponse sellAll(HyperPlayer p, HInventory inventory);
double getPrice(Player p, ItemStack item);
boolean addItemToEconomy(HItemStack stack, String economyName, String requestedName);
}