Examples of CurrencyAddEvent


Examples of com.Acrobot.ChestShop.Events.Economy.CurrencyAddEvent

        }

        BigDecimal tax = getTax(event.getAmount(), taxAmount);

        if (!Economy.getServerAccountName().isEmpty()) {
            CurrencyAddEvent currencyAddEvent = new CurrencyAddEvent(tax, NameManager.getUUID(Economy.getServerAccountName()), event.getWorld());
            ChestShop.callEvent(currencyAddEvent);
        }

        event.setAmount(event.getAmount().subtract(tax));
    }
View Full Code Here

Examples of com.Acrobot.ChestShop.Events.Economy.CurrencyAddEvent

    public static boolean isOwnerEconomicallyActive(Inventory inventory) {
        return !ChestShopSign.isAdminShop(inventory) || !getServerAccountName().isEmpty();
    }

    public static boolean add(UUID name, World world, double amount) {
        CurrencyAddEvent event = new CurrencyAddEvent(BigDecimal.valueOf(amount), name, world);
        ChestShop.callEvent(event);

        return true;
    }
View Full Code Here

Examples of com.Acrobot.ChestShop.Events.Economy.CurrencyAddEvent

    public static void onBuyTransaction(TransactionEvent event) {
        if (event.getTransactionType() != BUY) {
            return;
        }

        CurrencyAddEvent currencyAddEvent = new CurrencyAddEvent(BigDecimal.valueOf(event.getPrice()),
                                                            event.getOwner().getUniqueId(),
                                                            event.getSign().getWorld());
        ChestShop.callEvent(currencyAddEvent);

        CurrencySubtractEvent currencySubtractEvent = new CurrencySubtractEvent(BigDecimal.valueOf(event.getPrice()), event.getClient());
View Full Code Here

Examples of com.Acrobot.ChestShop.Events.Economy.CurrencyAddEvent

        CurrencySubtractEvent currencySubtractEvent = new CurrencySubtractEvent(BigDecimal.valueOf(event.getPrice()),
                                                                            event.getOwner().getUniqueId(),
                                                                            event.getSign().getWorld());
        ChestShop.callEvent(currencySubtractEvent);

        CurrencyAddEvent currencyAddEvent = new CurrencyAddEvent(BigDecimal.valueOf(event.getPrice()), event.getClient());
        ChestShop.callEvent(currencyAddEvent);
    }
View Full Code Here

Examples of com.Acrobot.ChestShop.Events.Economy.CurrencyAddEvent

        }

        String ownerName = NameManager.getFullUsername(event.getSign().getLine(NAME_LINE));
        UUID owner = NameManager.getUUID(ownerName);

        CurrencyAddEvent currencyEvent = new CurrencyAddEvent(BigDecimal.valueOf(refundPrice), owner, event.getSign().getWorld());
        ChestShop.callEvent(currencyEvent);

        String message = Messages.SHOP_REFUNDED.replace("%amount", Economy.formatBalance(refundPrice));
        event.getDestroyer().sendMessage(Messages.prefix(message));
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.