mirror of
https://github.com/essentials/Essentials.git
synced 2025-08-26 07:54:41 +02:00
Commandcost fix
This commit is contained in:
@@ -88,10 +88,9 @@ public class Trade
|
|||||||
final ISettings settings = ess.getSettings();
|
final ISettings settings = ess.getSettings();
|
||||||
settings.acquireReadLock();
|
settings.acquireReadLock();
|
||||||
|
|
||||||
|
double money;
|
||||||
if (command != null && !command.isEmpty()
|
if (command != null && !command.isEmpty()
|
||||||
&& !NoCommandCostPermissions.getPermission(command).isAuthorized(user)
|
&& 0 < (money = getCommandCost(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)
|
|
||||||
&& !Permissions.ECO_LOAN.isAuthorized(user))
|
&& !Permissions.ECO_LOAN.isAuthorized(user))
|
||||||
{
|
{
|
||||||
throw new ChargeException(_("notEnoughMoney"));
|
throw new ChargeException(_("notEnoughMoney"));
|
||||||
|
Reference in New Issue
Block a user