mirror of
https://github.com/EssentialsX/Essentials.git
synced 2024-11-19 09:06:09 +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())
|
||||
{
|
||||
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);
|
||||
}
|
||||
@ -253,7 +253,7 @@ public class Trade
|
||||
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)))
|
||||
{
|
||||
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)
|
||||
{
|
||||
if (value.compareTo(BigDecimal.ZERO) == 0)
|
||||
if (value.signum() == 0)
|
||||
{
|
||||
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
|
||||
{
|
||||
if (value.compareTo(BigDecimal.ZERO) == 0)
|
||||
if (value.signum() == 0)
|
||||
{
|
||||
return;
|
||||
}
|
||||
@ -167,7 +167,7 @@ public class User extends UserData implements Comparable<User>, IReplyTo, IUser
|
||||
|
||||
public void takeMoney(final BigDecimal value, final CommandSender initiator)
|
||||
{
|
||||
if (value.compareTo(BigDecimal.ZERO) == 0)
|
||||
if (value.signum() == 0)
|
||||
{
|
||||
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)));
|
||||
}
|
||||
@ -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)));
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user