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.java13
1 files changed, 4 insertions, 9 deletions
diff --git a/Essentials/src/com/earth2me/essentials/commands/Commandeco.java b/Essentials/src/com/earth2me/essentials/commands/Commandeco.java
index 6f46f0e00..22ee01a34 100644
--- a/Essentials/src/com/earth2me/essentials/commands/Commandeco.java
+++ b/Essentials/src/com/earth2me/essentials/commands/Commandeco.java
@@ -126,17 +126,12 @@ public class Commandeco extends EssentialsCommand
break;
case TAKE:
- if (player.canAfford(amount))
+ if (!player.canAfford(amount))
{
- player.takeMoney(amount);
- }
- else
- {
- if (player.getMoney() > 0)
- {
- player.setMoney(0);
- }
+ throw new Exception(_("notEnoughMoney"));
+
}
+ player.takeMoney(amount, sender);
break;
case RESET: