Add Minimum Balance, to allow people to manage overdrafts.

This commit is contained in:
KHobbits 2012-02-26 04:15:14 +00:00
parent 13d3cc3306
commit 9f893e68e9
9 changed files with 57 additions and 7 deletions

View file

@ -1,5 +1,6 @@
package com.earth2me.essentials.commands;
import static com.earth2me.essentials.I18n._;
import com.earth2me.essentials.User;
import java.util.Locale;
import org.bukkit.Server;
@ -45,6 +46,9 @@ public class Commandeco extends EssentialsCommand
break;
case TAKE:
if (!player.canAfford(amount, false)) {
throw new Exception(_("notEnoughMoney"));
}
player.takeMoney(amount);
break;