1
0
mirror of https://github.com/essentials/Essentials.git synced 2025-08-26 07:54:41 +02:00

Commandcost fix

This commit is contained in:
ementalo
2012-06-29 01:05:17 +01:00
parent 7ed07dedba
commit 9579917efa

View File

@@ -88,10 +88,9 @@ public class Trade
final ISettings settings = ess.getSettings();
settings.acquireReadLock();
double money;
if (command != null && !command.isEmpty()
&& !NoCommandCostPermissions.getPermission(command).isAuthorized(user)
&& money < settings.getData().getEconomy().getCommandCost(command.charAt(0) == '/' ? command.substring(1) : command)
&& 0 < settings.getData().getEconomy().getCommandCost(command.charAt(0) == '/' ? command.substring(1) : command)
&& 0 < (money = getCommandCost(user))
&& !Permissions.ECO_LOAN.isAuthorized(user))
{
throw new ChargeException(_("notEnoughMoney"));