Fix another /eco set bug.

This commit is contained in:
AppleDash 2016-09-23 17:42:19 -04:00
parent fab5b76b64
commit c63a15dac5

View File

@ -113,17 +113,19 @@ public class EconomyAdminCommand extends SaneEconomyCommand {
ecoMan.setBalance(economable, amount);
MessageUtils.sendMessage(sender, _("Balance for %s set to %s."), sTargetPlayer, ecoMan.getCurrency().formatAmount(amount));
// FIXME: This is a silly hack to get it to log.
if (oldBal > 0.0) {
if (saneEconomy.shouldLogTransactions()) {
// FIXME: This is a silly hack to get it to log.
if (oldBal > 0.0) {
saneEconomy.getTransactionLogger().logTransaction(new Transaction(
economable, Economable.CONSOLE, oldBal, TransactionReason.ADMIN
));
}
saneEconomy.getTransactionLogger().logTransaction(new Transaction(
economable, Economable.CONSOLE, oldBal, TransactionReason.ADMIN
Economable.CONSOLE, economable, amount, TransactionReason.ADMIN
));
}
saneEconomy.getTransactionLogger().logTransaction(new Transaction(
Economable.CONSOLE, economable, amount, TransactionReason.ADMIN
));
return;
}