Package com.Acrobot.ChestShop.DB

Examples of com.Acrobot.ChestShop.DB.Transaction


        }

        double pricePerStack = event.getPrice() / event.getStock().length;

        for (ItemStack item : event.getStock()) {
            Transaction transaction = new Transaction();

            transaction.setAmount(item.getAmount());

            transaction.setItemID(item.getTypeId());
            transaction.setItemDurability(item.getDurability());

            transaction.setPrice((float) pricePerStack);

            transaction.setShopOwner(NameManager.getUsername(event.getOwner().getUniqueId()));
            transaction.setShopUser(NameManager.getUsername(event.getClient().getUniqueId()));

            transaction.setSec(System.currentTimeMillis() / 1000);
            transaction.setBuy(event.getTransactionType() == BUY);

            Queue.addToQueue(transaction);
        }
    }
View Full Code Here

TOP

Related Classes of com.Acrobot.ChestShop.DB.Transaction

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.