Skip to content

Commit

Permalink
Format doubles correctly. Fixed #1
Browse files Browse the repository at this point in the history
  • Loading branch information
ShroomAgent27 committed Feb 11, 2018
1 parent 17f2e9c commit 161cc66
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ plugins {
}

group = 'org.sweetiebelle'
version = '1'
version = '2'

repositories {
jcenter()
Expand Down
6 changes: 3 additions & 3 deletions src/main/java/com/brohoof/brohoofeconomy/CommandHandler.java
Original file line number Diff line number Diff line change
Expand Up @@ -109,10 +109,10 @@ private void pay(CommandSender sender, String sourceCash, String toPay, double c
target.setCash(target.getCash() + cashToSend);
plugin.getData().saveAccount(source);
plugin.getData().saveAccount(target);
sender.sendMessage(ChatColor.DARK_GREEN + "You've sent " + cashToSend + " " + plugin.getSettings().curNamePlural + " to " + target.getName());
sender.sendMessage(String.format(ChatColor.DARK_GREEN + "You've sent %10.2f" + plugin.getSettings().curNamePlural + " from " + target.getName(), cashToSend));
Player pTarget = Bukkit.getPlayer(target.getUuid());
if (pTarget != null)
pTarget.sendMessage(ChatColor.DARK_GREEN + "You've recieved " + cashToSend + plugin.getSettings().curNamePlural + " from " + target.getName());
pTarget.sendMessage(String.format(ChatColor.DARK_GREEN + "You've recieved %10.2f" + plugin.getSettings().curNamePlural + " from " + target.getName(), cashToSend));
} else
sender.sendMessage(ChatColor.RED + "You do not have enough cash to send!");
} else
Expand All @@ -123,7 +123,7 @@ private void showBalance(CommandSender toSend, String target) {
Optional<Account> acco = plugin.getData().getAccount(target);
if (acco.isPresent()) {
Account acc = acco.get();
toSend.sendMessage(ChatColor.LIGHT_PURPLE + acc.getName() + ChatColor.RESET + " has " + ChatColor.DARK_GREEN + acc.getCash());
toSend.sendMessage(String.format(ChatColor.LIGHT_PURPLE + acc.getName() + ChatColor.RESET + " has " + ChatColor.DARK_GREEN + "%10.2f", acc.getCash()));
} else
toSend.sendMessage(ChatColor.RED + "No account by that username found!");
}
Expand Down

0 comments on commit 161cc66

Please sign in to comment.