mirror of
https://github.com/EssentialsX/Essentials.git
synced 2024-11-19 17:15:16 +01:00
Couple more bits of Eco cleanup
This commit is contained in:
parent
9ec1a6b78f
commit
1bb7946e13
@ -243,7 +243,7 @@ public class Trade
|
|||||||
if (command != null && !command.isEmpty())
|
if (command != null && !command.isEmpty())
|
||||||
{
|
{
|
||||||
cost = ess.getSettings().getCommandCost(command.charAt(0) == '/' ? command.substring(1) : command);
|
cost = ess.getSettings().getCommandCost(command.charAt(0) == '/' ? command.substring(1) : command);
|
||||||
if (cost.compareTo(BigDecimal.ZERO) == 0 && fallbackTrade != null)
|
if (cost.signum() == 0 && fallbackTrade != null)
|
||||||
{
|
{
|
||||||
cost = fallbackTrade.getCommandCost(user);
|
cost = fallbackTrade.getCommandCost(user);
|
||||||
}
|
}
|
||||||
@ -253,7 +253,7 @@ public class Trade
|
|||||||
ess.getLogger().log(Level.INFO, "calculated command (" + command + ") cost for " + user.getName() + " as " + cost);
|
ess.getLogger().log(Level.INFO, "calculated command (" + command + ") cost for " + user.getName() + " as " + cost);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (cost.compareTo(BigDecimal.ZERO) != 0 && (user.isAuthorized("essentials.nocommandcost.all")
|
if (cost.signum() != 0 && (user.isAuthorized("essentials.nocommandcost.all")
|
||||||
|| user.isAuthorized("essentials.nocommandcost." + command)))
|
|| user.isAuthorized("essentials.nocommandcost." + command)))
|
||||||
{
|
{
|
||||||
return BigDecimal.ZERO;
|
return BigDecimal.ZERO;
|
||||||
|
@ -128,7 +128,7 @@ public class User extends UserData implements Comparable<User>, IReplyTo, IUser
|
|||||||
|
|
||||||
public void giveMoney(final BigDecimal value, final CommandSender initiator)
|
public void giveMoney(final BigDecimal value, final CommandSender initiator)
|
||||||
{
|
{
|
||||||
if (value.compareTo(BigDecimal.ZERO) == 0)
|
if (value.signum() == 0)
|
||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@ -142,7 +142,7 @@ public class User extends UserData implements Comparable<User>, IReplyTo, IUser
|
|||||||
|
|
||||||
public void payUser(final User reciever, final BigDecimal value) throws Exception
|
public void payUser(final User reciever, final BigDecimal value) throws Exception
|
||||||
{
|
{
|
||||||
if (value.compareTo(BigDecimal.ZERO) == 0)
|
if (value.signum() == 0)
|
||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@ -167,7 +167,7 @@ public class User extends UserData implements Comparable<User>, IReplyTo, IUser
|
|||||||
|
|
||||||
public void takeMoney(final BigDecimal value, final CommandSender initiator)
|
public void takeMoney(final BigDecimal value, final CommandSender initiator)
|
||||||
{
|
{
|
||||||
if (value.compareTo(BigDecimal.ZERO) == 0)
|
if (value.signum() == 0)
|
||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -49,7 +49,7 @@ public class Commandsell extends EssentialsCommand
|
|||||||
{
|
{
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (totalWorth.compareTo(BigDecimal.ZERO) > 0)
|
if (totalWorth.signum() > 0)
|
||||||
{
|
{
|
||||||
user.sendMessage(_("totalWorthAll", type, Util.displayCurrency(totalWorth, ess)));
|
user.sendMessage(_("totalWorthAll", type, Util.displayCurrency(totalWorth, ess)));
|
||||||
}
|
}
|
||||||
@ -71,7 +71,7 @@ public class Commandsell extends EssentialsCommand
|
|||||||
{
|
{
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (totalWorth.compareTo(BigDecimal.ZERO) > 0)
|
if (totalWorth.signum() > 0)
|
||||||
{
|
{
|
||||||
user.sendMessage(_("totalWorthBlocks", type, Util.displayCurrency(totalWorth, ess)));
|
user.sendMessage(_("totalWorthBlocks", type, Util.displayCurrency(totalWorth, ess)));
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user