mirror of
https://github.com/Auxilor/EcoBits.git
synced 2025-12-19 15:09:19 +00:00
Merge pull request #13 from aven0xx/master
Recipient Payment Notification
This commit is contained in:
@@ -88,6 +88,17 @@ class CommandPay(
|
|||||||
recipient.adjustBalance(currency, amount.toBigDecimal())
|
recipient.adjustBalance(currency, amount.toBigDecimal())
|
||||||
player.adjustBalance(currency, -amount.toBigDecimal())
|
player.adjustBalance(currency, -amount.toBigDecimal())
|
||||||
|
|
||||||
|
// Send a message to recipient if connected
|
||||||
|
if (recipient.isOnline) {
|
||||||
|
(recipient.player as Player).sendMessage(
|
||||||
|
plugin.langYml.getMessage("received-money", StringUtils.FormatOption.WITHOUT_PLACEHOLDERS)
|
||||||
|
.replace("%player%", player.savedDisplayName)
|
||||||
|
.replace("%amount%", amount.toNiceString())
|
||||||
|
.replace("%currency%", currency.name)
|
||||||
|
)
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
player.sendMessage(
|
player.sendMessage(
|
||||||
plugin.langYml.getMessage("paid-player", StringUtils.FormatOption.WITHOUT_PLACEHOLDERS)
|
plugin.langYml.getMessage("paid-player", StringUtils.FormatOption.WITHOUT_PLACEHOLDERS)
|
||||||
.replace("%player%", recipient.savedDisplayName)
|
.replace("%player%", recipient.savedDisplayName)
|
||||||
|
|||||||
@@ -20,6 +20,7 @@ messages:
|
|||||||
cannot-afford: "&cYou can't afford to do this!"
|
cannot-afford: "&cYou can't afford to do this!"
|
||||||
paid-player: "&fYou paid %player%&r &a%amount%&r &f%currency%&f!"
|
paid-player: "&fYou paid %player%&r &a%amount%&r &f%currency%&f!"
|
||||||
too-much: "&fYou can't pay %player%&r this many &f%currency%&f as they already have too many!"
|
too-much: "&fYou can't pay %player%&r this many &f%currency%&f as they already have too many!"
|
||||||
|
received-money: "&fYou received &a%amount% &f%currency% from %player%."
|
||||||
top:
|
top:
|
||||||
name-empty: "&cEmpty"
|
name-empty: "&cEmpty"
|
||||||
amount-empty: "&cEmpty"
|
amount-empty: "&cEmpty"
|
||||||
|
|||||||
Reference in New Issue
Block a user