|
|
|
@@ -60,7 +60,7 @@ public class ShopManagementGui extends AbstractGui {
|
|
|
|
|
inventory.setItem(GuiIcon.MANAGE_SHOP.getSlot(), shopIcon);
|
|
|
|
|
inventory.setItem(GuiIcon.MANAGE_SHOP_BALANCE_ADD.getSlot(), GuiIcon.MANAGE_SHOP_BALANCE_ADD.getItemStack());
|
|
|
|
|
inventory.setItem(GuiIcon.MANAGE_SHOP_BALANCE_REMOVE.getSlot(), GuiIcon.MANAGE_SHOP_BALANCE_REMOVE.getItemStack());
|
|
|
|
|
inventory.setItem(GuiIcon.MANAGE_SHOP_COLLECT_SALES.getSlot(), GuiIcon.MANAGE_SHOP_COLLECT_SALES.getItemStack());
|
|
|
|
|
inventory.setItem(GuiIcon.MANAGE_SHOP_COLLECT_SALE.getSlot(), GuiIcon.MANAGE_SHOP_COLLECT_SALE.getItemStack());
|
|
|
|
|
inventory.setItem(GuiIcon.MANAGE_SHOP_SALES.getSlot(), GuiIcon.MANAGE_SHOP_SALES.getItemStack());
|
|
|
|
|
inventory.setItem(GuiIcon.MANAGE_SHOP_ITEM.getSlot(), GuiIcon.MANAGE_SHOP_ITEM.getItemStack());
|
|
|
|
|
inventory.setItem(GuiIcon.MANAGE_SHOP_TYPE.getSlot(), GuiIcon.MANAGE_SHOP_TYPE.getItemStack());
|
|
|
|
@@ -77,13 +77,13 @@ public class ShopManagementGui extends AbstractGui {
|
|
|
|
|
public void onClick(int slot, ItemStack item) {
|
|
|
|
|
super.onClick(slot, item);
|
|
|
|
|
|
|
|
|
|
if (slot == GuiIcon.MANAGE_SHOP_COLLECT_SALES.getSlot() && GuiIcon.MANAGE_SHOP_COLLECT_SALES.getItemStack().equals(item)) {
|
|
|
|
|
if (slot == GuiIcon.MANAGE_SHOP_COLLECT_SALE.getSlot() && GuiIcon.MANAGE_SHOP_COLLECT_SALE.getItemStack().equals(item)) {
|
|
|
|
|
Player player = getPlayer();
|
|
|
|
|
double d = 0;
|
|
|
|
|
int count = 0;
|
|
|
|
|
if (!ShopUtil.canManageShop(player, this.shop))
|
|
|
|
|
return;
|
|
|
|
|
if (!this.shop.getType().equals(ShopType.SELL))
|
|
|
|
|
if (this.shop.getType().equals(ShopType.BUY))
|
|
|
|
|
return;
|
|
|
|
|
|
|
|
|
|
double balance = this.shop.getBalance();
|
|
|
|
|