155156157158159160161162
item.setAmount(amount); ItemStack[] items = {item}; TransactionType transactionType = (action == buy ? BUY : SELL); return new PreTransactionEvent(ownerInventory, player.getInventory(), items, price, player, owner, sign, transactionType); }