| Constructor and Description |
|---|
WauzShopActions() |
| Modifier and Type | Method and Description |
|---|---|
static boolean |
buy(org.bukkit.entity.Player player,
WauzShopItem itemToBuy,
WauzShopDiscount discount)
Tries to buy the given item for the player.
|
static boolean |
repair(org.bukkit.entity.Player player,
org.bukkit.inventory.ItemStack itemToRepair,
boolean fromShop)
Tries to repair the given item for the player.
|
static boolean |
sell(org.bukkit.entity.Player player,
org.bukkit.inventory.ItemStack itemToSell,
boolean sellSound)
Tries to sell the given item for the player.
|
public static boolean buy(org.bukkit.entity.Player player,
WauzShopItem itemToBuy,
WauzShopDiscount discount)
player - The player who wants to buy the item.itemToBuy - The item that should be bought.discount - The discount on the price of the item.WauzCurrency.getCurrencyAmount(Player),
ItemUtils.fitsInInventory(Inventory, ItemStack),
ItemUtils.isAmmoItem(ItemStack),
PlayerConfigurator.setArrowAmount(Player, String, int)public static boolean sell(org.bukkit.entity.Player player,
org.bukkit.inventory.ItemStack itemToSell,
boolean sellSound)
player - The player who wants to sell the item.itemToSell - The item that should be sold.sellSound - If a sell sound should be played.PlayerCollectionConfigurator.setCharacterCoins(Player, long),
ItemUtils.isBoughtItem(ItemStack),
ItemUtils.getSellValue(ItemStack),
PlayerSkillConfigurator.getTradingFloat(Player),
AchievementTracker.addProgress(Player, WauzAchievementType, double)public static boolean repair(org.bukkit.entity.Player player,
org.bukkit.inventory.ItemStack itemToRepair,
boolean fromShop)
player - The player who wants to repair the item.itemToRepair - The item that should be repaired.fromShop - If the repairing was triggered from a shop menu.EquipmentUtils.getCurrentDurability(ItemStack),
EquipmentUtils.getMaximumDurability(ItemStack),
PlayerCollectionConfigurator.setCharacterCoins(Player, long),
DurabilityCalculator.repairItem(Player, ItemStack)