Skip to content

Commit

Permalink
Fix amount rounding
Browse files Browse the repository at this point in the history
  • Loading branch information
Brokkonaut committed Apr 28, 2020
1 parent fe8c189 commit c179aa2
Showing 1 changed file with 1 addition and 1 deletion.
Expand Up @@ -39,7 +39,7 @@ public boolean onCommand(CommandSender sender, Command command, String alias, St
return true;
}
double amount = args.getNext(0.0);
amount = ((long) (amount * 100)) / 100.0;
amount = (Math.round(amount * 100)) / 100.0;
if (!Double.isFinite(amount) || amount < 0.01) {
sender.sendMessage(CubeConomy.MESSAGE_PREFIX + ChatColor.RED + "Amount must be positive");
return true;
Expand Down

0 comments on commit c179aa2

Please sign in to comment.