1
0
mirror of https://github.com/Zrips/Jobs.git synced 2024-12-29 04:18:07 +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

@ -37,6 +37,10 @@ public final class JobsPaymentEvent extends Event implements Cancellable {
public void setCancelled(boolean cancel) {
cancelled = cancel;
}
public void setAmount(double money) {
this.money = money;
}
public HandlerList getHandlers() {
return handlers;
@ -45,4 +49,4 @@ public final class JobsPaymentEvent extends Event implements Cancellable {
public static HandlerList getHandlerList() {
return handlers;
}
}
}

View File

@ -167,6 +167,9 @@ public class BufferedEconomy {
// If event is canceled, dont do anything
if (JobsPaymentEvent.isCancelled())
continue;
double newAmount = JobsPaymentEvent.getAmount();
payment.setAmount(newAmount);
if (Jobs.getGCManager().UseServerAccount) {
if (!hasMoney) {