1
0
mirror of https://github.com/Zrips/Jobs.git synced 2024-12-31 21:37:57 +01:00

Merge pull request #20 from HYVE-Software/master

Editable JobsPaymentEvent
This commit is contained in:
Zrips 2016-04-05 15:43:41 +03:00
commit dd602cbb67
2 changed files with 8 additions and 1 deletions

View File

@ -38,6 +38,10 @@ public final class JobsPaymentEvent extends Event implements Cancellable {
cancelled = cancel;
}
public void setAmount(double money) {
this.money = money;
}
public HandlerList getHandlers() {
return handlers;
}

View File

@ -168,6 +168,9 @@ public class BufferedEconomy {
if (JobsPaymentEvent.isCancelled())
continue;
double newAmount = JobsPaymentEvent.getAmount();
payment.setAmount(newAmount);
if (Jobs.getGCManager().UseServerAccount) {
if (!hasMoney) {
Jobs.getActionBar().send(payment.getOfflinePlayer().getPlayer(), ChatColor.RED + Jobs.getLanguage().getMessage("economy.error.nomoney"));