From ff8ae7be3be9839f1c496770330c0ba06fd91d7f Mon Sep 17 00:00:00 2001 From: Trent Hensler Date: Wed, 3 Jan 2018 23:32:19 -0800 Subject: [PATCH] Check for sender in f money ff. Fixes #993 --- .../com/massivecraft/factions/cmd/CmdMoneyTransferFf.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/main/java/com/massivecraft/factions/cmd/CmdMoneyTransferFf.java b/src/main/java/com/massivecraft/factions/cmd/CmdMoneyTransferFf.java index 4a8955de..ad9d067b 100644 --- a/src/main/java/com/massivecraft/factions/cmd/CmdMoneyTransferFf.java +++ b/src/main/java/com/massivecraft/factions/cmd/CmdMoneyTransferFf.java @@ -7,6 +7,7 @@ import com.massivecraft.factions.integration.Econ; import com.massivecraft.factions.struct.Permission; import com.massivecraft.factions.zcore.util.TL; import org.bukkit.ChatColor; +import org.bukkit.entity.Player; public class CmdMoneyTransferFf extends FCommand { @@ -43,7 +44,8 @@ public class CmdMoneyTransferFf extends FCommand { boolean success = Econ.transferMoney(fme, from, to, amount); if (success && Conf.logMoneyTransactions) { - P.p.log(ChatColor.stripColor(P.p.txt.parse(TL.COMMAND_MONEYTRANSFERFF_TRANSFER.toString(), fme.getName(), Econ.moneyString(amount), from.describeTo(null), to.describeTo(null)))); + String name = sender instanceof Player ? fme.getName() : sender.getName(); + P.p.log(ChatColor.stripColor(P.p.txt.parse(TL.COMMAND_MONEYTRANSFERFF_TRANSFER.toString(), name, Econ.moneyString(amount), from.describeTo(null), to.describeTo(null)))); } }