Skip to content

Commit

Permalink
Use MV alias if possible when paying
Browse files Browse the repository at this point in the history
  • Loading branch information
tastybento committed Apr 30, 2020
1 parent ffbb7c8 commit e6541ee
Showing 1 changed file with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -79,11 +79,11 @@ public boolean onCommand(CommandSender sender, Command command, String label, St
sender.sendMessage(ChatColor.GREEN + ((Lang.sendTo
.replace("[name]", target.getName()))
.replace("[amount]", plugin.getVh().getEcon().format(amount)))
.replace("[world]", player.getWorld().getName()));
.replace("[world]", plugin.getWorldName(player.getWorld())));
target.sendMessage(ChatColor.GREEN + (Lang.receiveFrom
.replace("[name]", sender.getName())
.replace("[amount]", plugin.getVh().getEcon().format(amount)))
.replace("[world]", player.getWorld().getName()));
.replace("[world]", plugin.getWorldName(player.getWorld())));
// Override the payment
return true;
} else {
Expand Down Expand Up @@ -123,11 +123,11 @@ private void pay(Player target, Player player, double amount) {
player.sendMessage(ChatColor.GREEN + ((Lang.sendTo
.replace("[name]", target.getName()))
.replace("[amount]", plugin.getVh().getEcon().format(amount)))
.replace("[world]", player.getWorld().getName()));
.replace("[world]", plugin.getWorldName(player.getWorld())));
target.sendMessage(ChatColor.GREEN + (Lang.receiveFrom
.replace("[name]", player.getName())
.replace("[amount]", plugin.getVh().getEcon().format(amount)))
.replace("[world]", player.getWorld().getName()));
.replace("[world]", plugin.getWorldName(player.getWorld())));
} else {
// Cannot pay - let pay handle the error
player.sendMessage(ChatColor.RED + Lang.error + " " + ChatColor.DARK_RED + Lang.insufficientFunds);
Expand Down

0 comments on commit e6541ee

Please sign in to comment.