mirror of
https://github.com/TotalFreedomMC/TF-EssentialsX.git
synced 2025-07-26 23:45:23 +00:00
Add Minimum Balance, to allow people to manage overdrafts.
This commit is contained in:
parent
13d3cc3306
commit
9f893e68e9
9 changed files with 57 additions and 7 deletions
|
@ -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;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue