summaryrefslogtreecommitdiffstats
path: root/Essentials/src/com/earth2me/essentials/commands/Commandeco.java
diff options
context:
space:
mode:
Diffstat (limited to 'Essentials/src/com/earth2me/essentials/commands/Commandeco.java')
-rw-r--r--Essentials/src/com/earth2me/essentials/commands/Commandeco.java9
1 files changed, 7 insertions, 2 deletions
diff --git a/Essentials/src/com/earth2me/essentials/commands/Commandeco.java b/Essentials/src/com/earth2me/essentials/commands/Commandeco.java
index d2efc1845..b9694ee49 100644
--- a/Essentials/src/com/earth2me/essentials/commands/Commandeco.java
+++ b/Essentials/src/com/earth2me/essentials/commands/Commandeco.java
@@ -46,8 +46,9 @@ public class Commandeco extends EssentialsCommand
break;
case TAKE:
- if (!player.canAfford(amount, false)) {
- throw new Exception(_("notEnoughMoney"));
+ if (!player.canAfford(amount, false))
+ {
+ throw new Exception(_("notEnoughMoney"));
}
player.takeMoney(amount);
break;
@@ -68,6 +69,10 @@ public class Commandeco extends EssentialsCommand
break;
case TAKE:
+ if (!player.canAfford(amount, false))
+ {
+ throw new Exception(_("notEnoughMoney"));
+ }
player.takeMoney(amount, sender);
break;