Develop Guide
Get shop object
ConfigManager.configmanager.shopConfigs.get(shopID);Get product object
ObjectShop shop = ConfigManager.configmanager.shopConfigs.get(shopID);
if (shop == null) {
return;
}
ObjectItem item = shop.getProduct("TEST");
List<ObjectItem> items = shop.getProductList();Start buy a product
BuyProductMethod.startBuy(Inventory inventory, String shop, String product, Player player, boolean quick, boolean test, int multi);inventoryis Bukkit inventory object, for player's inventory, use player.getInventory() method.shopis shop ID.productis product ID.quickis whether send message after buy (will still send if you enable send-message-after-buy option in config.yml)testis whether take money or items from player, set it to true if you just want to know whether player has enough money or items.multiis buy amount in one time, default set to 1.
Start sell a product
ableMaxSellis whether if player don't have enough money or items for now multi(amount) value, we will try to get max amount that player able to sell. Use for sell all command.
Get player cache object
Can get player's buy times, sell times data and so on.
Get server cache object
Get price from ItemStack
Get whether the price is Vault
All price/product configs follows EconomyFormat or ItemFormat.
Give GiveResult
Take TakeResult
Get TakeResult from which product
Last updated