Modifier and Type | Class and Description |
---|---|
static class |
Database.DatabaseType |
static class |
Database.ShopInfo |
Modifier and Type | Method and Description |
---|---|
void |
addShop(Shop shop)
Adds a shop to the database
|
void |
connect()
(Re-)Connects to the the database and initializes it.
|
void |
disconnect()
Closes the connection to the database
|
Object |
get(int id,
Database.ShopInfo shopInfo) |
abstract Connection |
getConnection() |
int |
getHighestID() |
int |
getNextFreeID() |
void |
logEconomy(org.bukkit.entity.Player executor,
org.bukkit.inventory.ItemStack product,
org.bukkit.OfflinePlayer vendor,
Shop.ShopType shopType,
org.bukkit.Location location,
double price,
ShopBuySellEvent.Type type)
Log an economy transaction to the database
|
void |
removeShop(Shop shop)
Remove a shop from the database
|
public abstract Connection getConnection()
public void connect()
public int getNextFreeID()
public int getHighestID()
public void removeShop(Shop shop)
shop
- Shop to removepublic Object get(int id, Database.ShopInfo shopInfo)
id
- ID of the shopshopInfo
- What to getpublic void addShop(Shop shop)
shop
- Shop to addpublic void logEconomy(org.bukkit.entity.Player executor, org.bukkit.inventory.ItemStack product, org.bukkit.OfflinePlayer vendor, Shop.ShopType shopType, org.bukkit.Location location, double price, ShopBuySellEvent.Type type)
executor
- Player who bought/sold somethingproduct
- ItemStack that was bought/soldvendor
- Vendor of the shoplocation
- Location of the shopprice
- Price (buyprice or sellprice, depends on type
)type
- Whether the player bought or sold somethingpublic void disconnect()
Copyright © 2016. All rights reserved.